sparsifyVAR2: Function that determines the support of autoregression...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/sparsifyVAR2.r

Description

Function that determines the null and non-null elements of \mathbf{A}_1 and \mathbf{A}_2, the matrices of lag one and two (respectively) autoregression coefficients.

Usage

1
2
3
4
5
sparsifyVAR2(A1, A2, SigmaE, threshold=c("absValue", "localFDR", "top"), 
             absValueCut=c(0.25, 0.25), FDRcut=c(0.8, 0.8), top=c(10,10), 
             zerosA1=matrix(nrow=0, ncol=2), 
             zerosA2=matrix(nrow=0, ncol=2), 
             statistics=FALSE, verbose=TRUE)

Arguments

A1

A matrix \mathbf{A}_1 of lag one autoregression parameters.

A2

A matrix \mathbf{A}_2 of lag two autoregression parameters.

SigmaE

Covariance matrix of the errors (innovations).

threshold

A character signifying type of sparsification of both \mathbf{A}_1 and \mathbf{A}_2 by thresholding. Must be one of: "absValue", "localFDR", or "top".

absValueCut

A numeric (of length two) giving the cut-offs for element selection based on absolute value thresholding. The elements are the cut-offs applied to \mathbf{A}_1 and \mathbf{A}_2, respectively.

FDRcut

A numeric (of length two) giving the cut-offs for element selection based on local false discovery rate (FDR) thresholding. The elements are the cut-offs applied to \mathbf{A}_1 and \mathbf{A}_2, respectively.

top

A numeric (of length two) specifying the numbers of elements of \mathbf{A}_1 and \mathbf{A}_2, respectively, which are to be selected.

zerosA1

A matrix with indices of entries of \mathbf{A}_1 that are (prior to sparsification) known to be zero. The matrix comprises two columns, each row corresponding to an entry of \mathbf{A}_1. The first column contains the row indices and the second the column indices.

zerosA2

A matrix with indices of entries of \mathbf{A}_2 that are (prior to sparsification) known to be zero. The matrix comprises two columns, each row corresponding to an entry of \mathbf{A}_2. The first column contains the row indices and the second the column indices.

statistics

A logical indicator: should test statistics be returned. This only applies when threshold = "localFDR"

verbose

A logical indicator: should intermediate output be printed on the screen?

Details

When threshold = "localFDR" the function, following Lutkepohl (2005), divides the elements of (possibly regularized) input matrix \mathbf{A}_1 (or \mathbf{A}_2) of lag one (or two) autoregression coefficients by (an approximation of) their standard errors. Subsequently, the support of the matrix \mathbf{A}_1 (or \mathbf{A}_2) is determined by usage of the local FDR. In that case a mixture model is fitted to the nonredundant (standardized) elements of \mathbf{A}_1 (or \mathbf{A}_2) by fdrtool. The decision to retain elements is then based on the argument FDRcut. Elements with a posterior probability >=q FDRcut (equalling 1 - local FDR) are retained. See Strimmer (2008) for sparsifyfurther details. Alternatively, the support of \mathbf{A}_1 (or \mathbf{A}_2) is determined by simple thresholding on the absolute values of matrix entries (threshold = "absValue"). A third option (threshold = "top") is to retain a prespecified number of matrix entries based on absolute values of the elements of \mathbf{A}_1 (or \mathbf{A}_2). For example, one could wish to retain those entries representing the ten strongest cross-temporal coefficients.

The argument absValueCut is only used when threshold = "absValue". The argument FDRcut is only used when threshold = "localFDR". The argument top is only used when threshold = "top".

When prior to the sparsification knowledge on the support of \mathbf{A}_1 (or \mathbf{A}_2) is specified through the option zerosA1 (or zerosA2), the corresponding elements of \mathbf{A}_1 (or \mathbf{A}_2) are then not taken along in the local FDR procedure.

Value

A list-object with slots:

zerosA1

Matrix with indices of entries of \mathbf{A}_1 that are identified to be null. It includes the elements of \mathbf{A}_1 assumed to be zero prior to the sparsification as specified through the zerosA1 option.

nonzerosA1

Matrix with indices of entries of \mathbf{A}_1 that are identified to be non-null.

statisticsA1

Matrix with test statistics employed in the local FDR procedure.

zerosA2

Matrix with indices of entries of \mathbf{A}_2 that are identified to be null. It includes the elements of \mathbf{A}_2 assumed to be zero prior to the sparsification as specified through the zerosA2 option.

nonzerosA2

Matrix with indices of entries of \mathbf{A}_2 that are identified to be non-null.

statisticsA2

Matrix with test statistics employed in the local FDR procedure.

The matrices zerosA1, nonzerosA1, zerosA2 and nonzerosA2 comprise two columns, each row corresponding to an entry of \mathbf{A}_1 and \mathbf{A}_2, respectively. The first column contains the row indices and the second the column indices.

Author(s)

Wessel N. van Wieringen <w.vanwieringen@vumc.nl>, Carel F.W. Peeters.

References

Lutkepohl, H. (2005), New Introduction to Multiple Time Series Analysis. Springer, Berlin.

Miok, V., Wilting, S.M., Van Wieringen, W.N. (2018), “Ridge estimation of network models from time-course omics data”, Biometrical Journal, <DOI:10.1002/bimj.201700195>.

Strimmer, K. (2008), “fdrtool: a versatile R package for estimating local and tail area-based false discovery rates”, Bioinformatics 24(12): 1461-1462.

Van Wieringen, W.N., Peeters, C.F.W. (2016), “Ridge Estimation of Inverse Covariance Matrices from High-Dimensional Data”, Computational Statistics and Data Analysis, 103, 284-303.

See Also

ridgeVAR2, sparsify, sparsifyVAR1.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
# set dimensions (p=covariates, n=individuals, T=time points)
p <- 3; n <- 12; T <- 10

# set model parameters
SigmaE <- diag(p)/4
A1 <- -createA(p, "clique", nCliques=1, nonzeroA=0.1)
A2 <- t(createA(p, "chain", nBands=1, nonzeroA=0.1))

# generate data
Y <- dataVAR2(n, T, A1, A2, SigmaE)

# fit VAR(1) model
VAR2hat <- ridgeVAR2(Y, 1, 1, 1)

# obtain support of adjacancy matrix
A1nullornot <- matrix(0, p, p)
A1nullornot[sparsifyVAR2(VAR2hat$A1, VAR2hat$A2, solve(VAR1hat$P), 
                         threshold="top", top=c(3,3))$nonzerosA1] <- 1

## plot non-null structure of A1 
edgeHeat(A1nullornot)

wvanwie/ragt2ridges documentation built on May 4, 2019, 12:03 p.m.