sparsifyVARX1: Function that determines the support of (auto)regression...

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

View source: R/sparsifyVARX1.r

Description

Function that determines the support of \mathbf{A}, the matrix with autoregression coefficients, and \mathbf{B}, the matrix with regression coefficients of the time-varying covariates, of the VARX(1) model.

Usage

1
2
3
4
sparsifyVARX1(X, A, B, SigmaE, threshold=c("absValue", "localFDR", "top"), 
              absValueCut=rep(0.25, 2), FDRcut=rep(0.8, 2), top=rep(10, 2), 
              zerosA=matrix(nrow=0, ncol=2), zerosB=matrix(nrow=0, ncol=2), 
              statistics=FALSE, verbose=TRUE)

Arguments

X

Three-dimensional array containing the time-varying covariate data. The first, second and third dimensions correspond to covariates, time and samples, respectively. The data are assumed to be centered covariate-wise.

A

A matrix \mathbf{A} of autoregression parameters.

B

A matrix \mathbf{B} of regression parameters of the time-varying covariates stored in the array X.

SigmaE

Covariance matrix of the errors (innovations).

threshold

A character signifying type of sparsification of \mathbf{A} and \mathbf{B} 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.

FDRcut

A numeric of length two giving the cut-off (for \mathbf{A} and \mathbf{B}, respectively) for element selection based on local false discovery rate (FDR) thresholding.

top

A numeric of length two giving the number of elements of \code{A} and \mathbf{B}, respectively, which is to be selected, based on absolute value thresholding.

zerosA

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

zerosB

A Matrix with indices of entries of \mathbf{B} that are (prior to sparsification) known to be zero. The matrix comprises two columns, each row corresponding to an entry of \mathbf{B}. 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

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} of autoregression coefficients by (approximations of) their standard errors. Subsequently, the support of the matrix \mathbf{A} is determined by usage of local FDR. In that case a mixture model is fitted to the nonredundant (standardized) elements of \mathbf{A} 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 further details. Alternatively, the support of \mathbf{A} 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}. 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} and/or \mathbf{B} is specified through the options zerosA and/or zerosB, the corresponding elements of \mathbf{A} and \mathbf{B} are then not taken along in the local FDR procedure.

Value

A list-object with slots:

zerosA

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

nonzerosA

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

statisticsA

Matrix with test statistics employed in the local FDR procedure for the sparsification of \mathbf{A}.

zerosB

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

nonzerosB

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

statisticsB

Matrix with test statistics employed in the local FDR procedure for the sparsification of \mathbf{B}.

The matrices zerosA, nonzerosA, zerosB and nonzerosB comprise two columns, each row corresponding to an entry of either \mathbf{A} or \mathbf{B}. 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. (2019), “Ridge estimation of network models from time-course omics data”, Biometrical Journal, 61(2), 391-405.

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

ridgeVAR1, sparsify, sparsifyVAR1.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# set dimensions (p=covariates, n=individuals, T=time points)
p <- 3; n <- 4; T <- 10

# set model parameters
SigmaE <- diag(p)/4
Ax     <- createA(p, "chain", nBands=1)

# generate time-varying covariates in accordance with VAR(1) process
X <- dataVAR1(n, T, Ax, SigmaE)

# set model parameters
B <- createA(p, "clique", nCliques=1)
A <- createA(p, "hub", nHubs=1)

# generate time-varying covariates in accordance with VAR(1) process
Y <- dataVARX1(X, A, B, SigmaE, lagX=0)

# fit VARX(1) model
VARX1hat <- ridgeVARX1(Y, X, 1, 1, 1, lagX=0)

## determine which elements of A are non-null
## Not run:  Anullornot <- matrix(0, p, p) 
## Not run:  Anullornot[sparsifyVARX1(X, VARX1hat$A, VARX1hat$B,
        solve(VARX1hat$P), threshold="localFDR")$nonzeros] <- 1 
## End(Not run)
## REASON FOR NOT RUN:
## the employed local FDR approximation is only valid for reasonably sized 
## number of elements of A (say) at least p > 10 and, 
## consequently, a vector of 100 regression coefficients.

## plot non-null structure of A 
## Not run:  edgeHeat(Anullornot) 

ragt2ridges documentation built on Jan. 28, 2020, 5:08 p.m.