Package covsep. May 6, 2018

Similar documents
Tests for separability in nonparametric covariance operators of random surfaces

Package sbgcop. May 29, 2018

Package ShrinkCovMat

Package HIMA. November 8, 2017

Package BNN. February 2, 2018

Package depth.plot. December 20, 2015

Package invgamma. May 7, 2017

Package multivariance

Package gtheory. October 30, 2016

Package polypoly. R topics documented: May 27, 2017

Package jmcm. November 25, 2017

Package dhsic. R topics documented: July 27, 2017

Package RTransferEntropy

Package FinCovRegularization

Package SK. May 16, 2018

Package sscor. January 28, 2016

Package esreg. August 22, 2017

Package beam. May 3, 2018

Package scpdsi. November 18, 2018

Package scio. February 20, 2015

Package varband. November 7, 2016

Package msu. September 30, 2017

Package robustrao. August 14, 2017

Package basad. November 20, 2017

Package supernova. February 23, 2018

Package EnergyOnlineCPM

Package EMVS. April 24, 2018

Package reinforcedpred

Package stability. R topics documented: August 23, Type Package

Package IndepTest. August 23, 2018

Package sklarsomega. May 24, 2018

Package bivariate. December 10, 2018

Package HDtest. R topics documented: September 13, Type Package

Package horseshoe. November 8, 2016

Package SimSCRPiecewise

Package factorqr. R topics documented: February 19, 2015

Package Tcomp. June 6, 2018

Package denseflmm. R topics documented: March 17, 2017

Package gma. September 19, 2017

Package RZigZag. April 30, 2018

Package MPkn. May 7, 2018

Package Grace. R topics documented: April 9, Type Package

Package SEMModComp. R topics documented: February 19, Type Package Title Model Comparisons for SEM Version 1.0 Date Author Roy Levy

Package causalweight

Package icmm. October 12, 2017

Package thief. R topics documented: January 24, Version 0.3 Title Temporal Hierarchical Forecasting

Package NlinTS. September 10, 2018

Package effectfusion

Package bigtime. November 9, 2017

Package MultisiteMediation

Package matrixnormal

Package MonoPoly. December 20, 2017

Package gwqs. R topics documented: May 7, Type Package. Title Generalized Weighted Quantile Sum Regression. Version 1.1.0

Package RATest. November 30, Type Package Title Randomization Tests

Package netdep. July 10, 2018

Package noncompliance

Package xdcclarge. R topics documented: July 12, Type Package

Package eel. September 1, 2015

Package OGI. December 20, 2017

Package clogitboost. R topics documented: December 21, 2015

Package esaddle. R topics documented: January 9, 2017

Package SCEPtERbinary

Package sodavis. May 13, 2018

Package convospat. November 3, 2017

Package baystability

Package rgabriel. February 20, 2015

Package cartogram. June 21, 2018

Package r2glmm. August 5, 2017

Package SpatialVS. R topics documented: November 10, Title Spatial Variable Selection Version 1.1

Package idmtpreg. February 27, 2018

Package SpatialPack. March 20, 2018

Package face. January 19, 2018

Package RcppSMC. March 18, 2018

Package AID. R topics documented: November 10, Type Package Title Box-Cox Power Transformation Version 2.3 Date Depends R (>= 2.15.

Package MAPA. R topics documented: January 5, Type Package Title Multiple Aggregation Prediction Algorithm Version 2.0.4

Package HMMcopula. December 1, 2018

Package pssm. March 1, 2017

Package severity. February 20, 2015

Package darts. February 19, 2015

Package rnmf. February 20, 2015

Package QuantifQuantile

Package BootWPTOS. R topics documented: June 30, Type Package

Package nardl. R topics documented: May 7, Type Package

Package hds. December 31, 2016

Package milineage. October 20, 2017

Package ebal. R topics documented: February 19, Type Package

Package BGGE. August 10, 2018

TESTS FOR SEPARABILITY IN NONPARAMETRIC COVARIANCE OPERATORS OF RANDOM SURFACES

Package gk. R topics documented: February 4, Type Package Title g-and-k and g-and-h Distribution Functions Version 0.5.

Package freqdom. September 1, 2017

Package asus. October 25, 2017

Package metafuse. October 17, 2016

Package OrdNor. February 28, 2019

Package krige. August 24, 2018

Package LPTime. March 3, 2015

Package dominanceanalysis

Package flexcwm. R topics documented: July 11, Type Package. Title Flexible Cluster-Weighted Modeling. Version 1.0.

Package spthin. February 20, 2015

Package LIStest. February 19, 2015

The sbgcop Package. March 9, 2007

Transcription:

Package covsep May 6, 2018 Title Tests for Determining if the Covariance Structure of 2-Dimensional Data is Separable Version 1.1.0 Author Shahin Tavakoli [aut, cre], Davide Pigoli [ctb], John Aston [ctb] Maintainer Shahin Tavakoli <s.tavakoli@warwick.ac.uk> Functions for testing if the covariance structure of 2-dimensional data (e.g. samples of surfaces X_i = X_i(s,t)) is separable, i.e. if covariance(x) = C_1 x C_2. A complete descriptions of the implemented tests can be found in the paper Aston, John A. D.; Pigoli, Davide; Tavakoli, Shahin. Tests for separability in nonparametric covariance operators of random surfaces. Ann. Statist. 45 (2017), no. 4, 1431--1461. <doi:10.1214/16- AOS1495> <https://projecteuclid.org/euclid.aos/1498636862> <arxiv:1505.02023>. Depends R (>= 3.2.3) Imports mvtnorm (>= 1.0.4) License GPL-2 LazyData true URL http://arxiv.org/abs/1505.02023 RoxygenNote 6.0.1 NeedsCompilation no Repository CRAN Date/Publication 2018-05-06 15:37:27 UTC R topics documented: C1.............................................. 2 C2.............................................. 3 clt_test............................................ 3 covsep............................................ 5 1

2 C1 difference_fullcov...................................... 5 empirical_bootstrap_test.................................. 6 gaussian_bootstrap_test................................... 7 generate_surface_data.................................... 9 HS_empirical_bootstrap_test................................ 10 HS_gaussian_bootstrap_test................................ 11 marginal_covariances.................................... 12 projected_differences.................................... 12 renormalize_mtnorm.................................... 13 rmtnorm........................................... 14 SurfacesData........................................ 15 Index 16 C1 A covariance matrix Marginal covariance matrix C1 used for simulations in the paper http://arxiv.org/abs/1505. 02023 C1 Format An object of class matrix with 32 rows and 32 columns. This is a 32x32 real-valued covariance matrix. References Aston, John A. D.; Pigoli, Davide; Tavakoli, Shahin. Tests for separability in nonparametric covariance operators of random surfaces. Ann. Statist. 45 (2017), no. 4, 1431 1461. doi:10.1214/16- AOS1495. https://projecteuclid.org/euclid.aos/1498636862 data(c1) str(c1)

C2 3 C2 A covariance matrix Marginal covariance matrix C2 used for simulations in paper http://arxiv.org/abs/1505.02023 C2 Format An object of class matrix with 7 rows and 7 columns. This is a 7x7 real-valued covariance matrix. References Aston, John A. D.; Pigoli, Davide; Tavakoli, Shahin. Tests for separability in nonparametric covariance operators of random surfaces. Ann. Statist. 45 (2017), no. 4, 1431 1461. doi:10.1214/16- AOS1495. https://projecteuclid.org/euclid.aos/1498636862 data(c2) str(c2) clt_test Test for separability of covariance operators for Gaussian process. This function performs the asymptotic test for the separability of the covariance operator for a random surface generated from a Gaussian process (described in the paper http://arxiv.org/ abs/1505.02023). clt_test(data, L1, L2)

4 clt_test Data L1 L2 a (non-empty) N x d1 x d2 array of data values. The first direction indices the N observations, each consisting of a d1 x d2 discretization of the surface, so that Data[i,,] corresponds to the i-th observed surface. an integer or vector of integers in 1 : p indicating the eigenfunctions in the first direction to be used for the test. an integer or vector of integers in 1 : q indicating the eigenfunctions in the second direction to be used for the test. The p-value of the test for each pair (l1,l2) = (L1[k], L2[k]), for k = 1:length(L1). If L1 and L2 are vectors, they need to be of the same length. The function tests for separability using the projection of the covariance operator in the separable eigenfunctions u_i tensor v_j : i = 1,..., l1; j = 1,..., l2, for each pair (l1,l2) = (L1[k], L2[k]), for k = 1:length(L1). The test works by using asymptotics, and is only valid if the data is assumed to be Gaussian. The surface data needs to be measured or resampled on a common regular grid or on common basis functions. References Aston, John A. D.; Pigoli, Davide; Tavakoli, Shahin. Tests for separability in nonparametric covariance operators of random surfaces. Ann. Statist. 45 (2017), no. 4, 1431 1461. doi:10.1214/16- AOS1495. https://projecteuclid.org/euclid.aos/1498636862 See Also empirical_bootstrap_test, gaussian_bootstrap_test data(surfacesdata) clt_test(surfacesdata, L1=c(1,2), L2=c(1,4))

covsep 5 covsep covsep: tests for determining if the covariance structure of 2- dimensional data is separable Functions for testing if the covariance structure of 2-dimensional data (e.g. samples of surfaces X_i = X_i(s,t)) is separable, i.e. if cov(x) = C_1 x C_2. A complete descriptions of the implemented tests can be found in the paper Aston et al. (2017); see references below. Main functions The main functions are References clt_test, gaussian_bootstrap_test, empirical_bootstrap_test, HS_gaussian_bootstrap_test, HS_empirical_bootstrap_test Aston, John A. D.; Pigoli, Davide; Tavakoli, Shahin. Tests for separability in nonparametric covariance operators of random surfaces. Ann. Statist. 45 (2017), no. 4, 1431 1461. <doi:10.1214/16- AOS1495>. https://projecteuclid.org/euclid.aos/1498636862 difference_fullcov compute the difference between the full sample covariance and its separable approximation compute the difference between the full sample covariance and its separable approximation difference_fullcov(data) Data a (non-empty) N x d1 x d2 array of data values. The first direction indices the N observations, each consisting of a d1 x d2 discretization of the surface, so that Data[i,,] corresponds to the i-th observed surface.

6 empirical_bootstrap_test A d1 x d2 x d1 x d2 array, where d1 = nrow(data) and d2 = ncol(data). This is an internal function. empirical_bootstrap_test Projection-based empirical bootstrap test for separability of covariance structure This function performs the test for the separability of covariance structure of a random surface based on the empirical bootstrap procedure described in the paper http://arxiv.org/abs/1505.02023. empirical_bootstrap_test(data, L1 = 1, L2 = 1, studentize = "full", B = 1000, verbose = TRUE) Data L1 L2 studentize B verbose a (non-empty) N x d1 x d2 array of data values. The first direction indices the N observations, each consisting of a d1 x d2 discretization of the surface, so that Data[i,,] corresponds to the i-th observed surface. an integer or vector of integers in 1 : p indicating the eigenfunctions in the first direction to be used for the test. an integer or vector of integers in 1 : q indicating the eigenfunctions in the second direction to be used for the test. parameter to specify which type of studentization is performed. Possible options are no, diag or full (see details section). number of bootstrap replicates to be used. logical parameter for printing progress The p-value of the test for each pair (l1,l2) = (L1[k], L2[k]), for k = 1:length(L1).

gaussian_bootstrap_test 7 This function performs the test of separability of the covariance structure for a random surface (introduced in the paper http://arxiv.org/abs/1505.02023), when generated from a Gaussian process. The sample surfaces need to be measured on a common regular grid. The test consider a subspace formed by the tensor product of eigenfunctions of the separable covariances. It is possible to specify the number of eigenfunctions to be considered in each direction. If L1 and L2 are vectors, they need to be of the same length. The function tests for separability using the projection of the covariance operator in the separable eigenfunctions u_i x v_j : i = 1,..., l1; j = 1,..., l2, for each pair (l1,l2) = (L1[k], L2[k]), for k = 1:length(L1). studentize can take the values full default & recommended method. Yhe projection coordinates are renormalized by an estimate of their joint covariance no NOT RECOMMENDED. No studentization is performed diag NOT RECOMMENDED. Each projection coordinate is renormalized by an estimate of its standard deviation B the number of bootstrap replicates (1000 by default). verbose to print the progress of the computations (TRUE by default) References Aston, John A. D.; Pigoli, Davide; Tavakoli, Shahin. Tests for separability in nonparametric covariance operators of random surfaces. Ann. Statist. 45 (2017), no. 4, 1431 1461. doi:10.1214/16- AOS1495. https://projecteuclid.org/euclid.aos/1498636862 See Also gaussian_bootstrap_test, clt_test data(surfacesdata) empirical_bootstrap_test(surfacesdata) empirical_bootstrap_test(surfacesdata, B=100) empirical_bootstrap_test(surfacesdata,l1=2,l2=2, B=1000, studentize='full') gaussian_bootstrap_test Projection-based Gaussian (parametric) bootstrap test for separability of covariance structure

8 gaussian_bootstrap_test This function performs the test for the separability of covariance structure of a random surface generated from a Gaussian process, based on the parametric bootstrap procedure described in the paper http://arxiv.org/abs/1505.02023 gaussian_bootstrap_test(data, L1 = 1, L2 = 2, studentize = "full", B = 1000, verbose = TRUE) Data L1 L2 studentize B verbose a (non-empty) N x d1 x d2 array of data values. The first direction indices the N observations, each consisting of a d1 x d2 discretization of the surface, so that Data[i,,] corresponds to the i-th observed surface. an integer or vector of integers in 1 : p indicating the eigenfunctions in the first direction to be used for the test. an integer or vector of integers in 1 : q indicating the eigenfunctions in the second direction to be used for the test. parameter to specify which type of studentization is performed. Possible options are no, diag or full (see details section). number of bootstrap replicates to be used. logical parameter for printing progress The p-value of the test for each pair (l1,l2) = (L1[k], L2[k]), for k = 1:length(L1). This function performs the test of separability of the covariance structure for a random surface (introduced in the paper http://arxiv.org/abs/1505.02023), when generated from a Gaussian process. The sample surfaces need to be measured on a common regular grid. The test consider a subspace formed by the tensor product of eigenfunctions of the separable covariances. It is possible to specify the number of eigenfunctions to be considered in each direction. If L1 and L2 are vectors, they need to be of the same length. The function tests for separability using the projection of the covariance operator in the separable eigenfunctions u_i x v_j : i = 1,..., l1; j = 1,..., l2, for each pair (l1,l2) = (L1[k], L2[k]), for k = 1:length(L1). studentize can take the values full default & recommended method. Yhe projection coordinates are renormalized by an estimate of their joint covariance no NOT RECOMMENDED. No studentization is performed diag NOT RECOMMENDED. Each projection coordinate is renormalized by an estimate of its standard deviation

generate_surface_data 9 B the number of bootstrap replicates (1000 by default). verbose to print the progress of the computations (TRUE by default) References Aston, John A. D.; Pigoli, Davide; Tavakoli, Shahin. Tests for separability in nonparametric covariance operators of random surfaces. Ann. Statist. 45 (2017), no. 4, 1431 1461. doi:10.1214/16- AOS1495. https://projecteuclid.org/euclid.aos/1498636862 See Also empirical_bootstrap_test, clt_test data(surfacesdata) gaussian_bootstrap_test(surfacesdata) gaussian_bootstrap_test(surfacesdata, B=100) gaussian_bootstrap_test(surfacesdata, L1=2,L2=2,B=1000, studentize='full') generate_surface_data Generate surface data Generate samples of surface data generate_surface_data(n, C1, C2, gamma, distribution = "gaussian") N C1 C2 gamma distribution sample size row covariance column covariance parameter to specify how much the covariance is separable. distribution of the data A N x dim(c1)[1] x dim(c2)[1] array containing the generated data

10 HS_empirical_bootstrap_test gamma can take values between 0 and 1; gamma=0 corresponds to a separable covariance, gamma=1 corresponds to a non-separable covariance (described in the paper http://arxiv.org/abs/1505. 02023). s of gamma between 0 and 1 corresponds to an interpolation between these two covariances distribution can take the values gaussian or student References Aston, John A. D.; Pigoli, Davide; Tavakoli, Shahin. Tests for separability in nonparametric covariance operators of random surfaces. Ann. Statist. 45 (2017), no. 4, 1431 1461. doi:10.1214/16- AOS1495. https://projecteuclid.org/euclid.aos/1498636862 Data = generate_surface_data(30, C1, C2, gamma=0) HS_empirical_bootstrap_test Empirical bootstrap test for separability of covariance structure using Hilbert Schmidt distance Empirical bootstrap test for separability of covariance structure using Hilbert Schmidt distance HS_empirical_bootstrap_test(Data, B = 100, verbose = TRUE) Data B verbose a (non-empty) N x d1 x d2 array of data values. The first direction indices the N observations, each consisting of a d1 x d2 discretization of the surface, so that Data[i,,] corresponds to the i-th observed surface. number of bootstrap replicates to be used. logical parameter for printing progress The p-value of the test.

HS_gaussian_bootstrap_test 11 This function performs the test of separability of the covariance structure for a random surface (introduced in the paper http://arxiv.org/abs/1505.02023), when generated from a Gaussian process. The sample surfaces need to be measured on a common regular grid. The test considers the Hilbert Schmidt distance between the sample covariance and its separable approximation. WE DO NOT RECOMMEND THIS TEST, as it is does not have the correct level, nor good power. data(surfacesdata) HS_empirical_bootstrap_test(SurfacesData) HS_empirical_bootstrap_test(SurfacesData, B = 100) HS_gaussian_bootstrap_test Gaussian (parametric) bootstrap test for separability of covariance structure using Hilbert Schmidt distance Gaussian (parametric) bootstrap test for separability of covariance structure using Hilbert Schmidt distance HS_gaussian_bootstrap_test(Data, B = 1000, verbose = TRUE) Data B verbose a (non-empty) N x d1 x d2 array of data values. The first direction indices the N observations, each consisting of a d1 x d2 discretization of the surface, so that Data[i,,] corresponds to the i-th observed surface. number of bootstrap replicates to be used. logical parameter for printing progress The p-value of the test. This function performs the test of separability of the covariance structure for a random surface (introduced in the paper http://arxiv.org/abs/1505.02023), when generated from a Gaussian process. The sample surfaces need to be measured on a common regular grid. The test considers the Hilbert Schmidt distance between the sample covariance and its separable approximation. WE DO NOT RECOMMEND THIS TEST, as it is does not have the correct level, nor good power.

12 projected_differences data(surfacesdata) HS_gaussian_bootstrap_test(SurfacesData) HS_gaussian_bootstrap_test(SurfacesData, B = 100) marginal_covariances estimates marginal covariances (e.g. row and column covariances) of bi-dimensional sample estimates marginal covariances (e.g. row and column covariances) of bi-dimensional sample marginal_covariances(data) Data a (non-empty) N x d1 x d2 array of data values. The first direction indices the N observations, each consisting of a d1 x d2 discretization of the surface, so that Data[i,,] corresponds to the i-th observed surface. A list containing the row covariance (C1) and column covariance (C2) Data <- rmtnorm(30, C1, C2) marginal.cov <- marginal_covariances(data) projected_differences Compute the projection of the rescaled difference between the sample covariance and its separable approximation onto the separable eigenfunctions Compute the projection of the rescaled difference between the sample covariance and its separable approximation onto the separable eigenfunctions projected_differences(data, l1 = 1, l2 = 1, with.asymptotic.variances = TRUE)

renormalize_mtnorm 13 Data a (non-empty) N x d1 x d2 array of data values. The first direction indices the N observations, each consisting of a d1 x d2 discretization of the surface, so that Data[i,,] corresponds to the i-th observed surface. l1 number of eigenfunctions to be used in the first (row) dimension for the projection l2 number of eigenfunctions to be used in the second (column) dimension for the projection with.asymptotic.variances logical variable; if TRUE, the function outputs the estimate asymptotic variances of the projected differences A list with T.N The projected differences sigma.left The row covariances of T.N sigma.right The column covariances of T.N The function computes the projection of the rescaled difference between the sample covariance and its separable approximation onto the separable eigenfunctions u_i x v_j : i = 1,..., l1; j = 1,..., l2. Data <- rmtnorm(30, C1, C2) ans <- projected_differences(data, l1=1, l2=2) renormalize_mtnorm renormalize a matrix normal random matrix to have iid entries renormalize a matrix normal random matrix to have iid entries renormalize_mtnorm(x, C1, C2, type = "full") X C1 C2 type a matrix normal random matrix with mean zero row covariance column covariance the type of renormalization to do. Possible options are no, diag or full (see details section).

14 rmtnorm A matrix with renormalized entries type can take the values diag each entry of X is renormalized by its marginal standard deviation full X is renormalized by its root inverse covariance Data <- rmtnorm(30, C1, C2) ans <- renormalize_mtnorm(data[1,,], C1, C2) rmtnorm Generate a sample from a Matrix Gaussian distribution Generate a sample from a Matrix Gaussian distribution rmtnorm(n, C1, C2, M = matrix(0, nrow(c1), nrow(c2))) N C1 C2 M sample size row covariance column covariance mean matrix A N x dim(c1)[1] x dim(c2)[1] array containing the generated data Data = rmtnorm(30, C1, C2)

SurfacesData 15 SurfacesData A data set of surfaces Format Dataset of 50 surfaces simulated from a Gaussian process with a separable covariance structure. SurfacesData[i,,] corresponds to the i-th surface observed on a 32x7 uniform grid. SurfacesData An object of class array of dimension 50 x 32 x 7. This is a 50 x 32 x 7 array. data(surfacesdata) image(surfacesdata[1,,]) # color image of the first surface in the dataset

Index Topic datasets C1, 2 C2, 3 SurfacesData, 15 C1, 2 C2, 3 clt_test, 3, 5, 7, 9 covsep, 5 covsep-package (covsep), 5 difference_fullcov, 5 empirical_bootstrap_test, 4, 5, 6, 9 gaussian_bootstrap_test, 4, 5, 7, 7 generate_surface_data, 9 HS_empirical_bootstrap_test, 5, 10 HS_gaussian_bootstrap_test, 5, 11 marginal_covariances, 12 projected_differences, 12 renormalize_mtnorm, 13 rmtnorm, 14 SurfacesData, 15 16