optPenaltyVARX1: Automatic penalty parameter selection for the VARX(1) model.

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

Description

Automatic penalty parameter selection for the VARX(1) model through maximization of the leave-one-out cross-validated (LOOCV) log-likelihood.

Usage

1
2
3
optPenaltyVARX1(Y, X, lambdaMin, lambdaMax, 
                lambdaInit=(lambdaMin+lambdaMax)/2, 
                optimizer="nlm", ...)

Arguments

Y

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

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.

lambdaMin

A numeric of length three, containing the minimum values of ridge penalty parameters to be considered. The first element is the ridge parameter corresponding to the penalty on \mathbf{A}, the matrix with autoregression coefficients, the second to matrix \mathbf{B} containing the regression coefficients of the time-varying covariates, while the third parameter relates to the penalty on \mathbf{Ω}_{\varepsilon}, the precision matrix of the errors.

lambdaMax

A numeric of length three, containing the maximum values of ridge penalty parameters to be considered. The first element is the ridge parameter corresponding to the penalty on \mathbf{A}, the matrix with autoregression coefficients, the second to matrix \mathbf{B} containing the regression coefficients of the time-varying covariates, while the third parameter relates to the penalty on \mathbf{Ω}_{\varepsilon}, the precision matrix of the errors.

lambdaInit

A numeric of length three, containing the initial values of ridge penalty parameters to be considered. The first element is the ridge parameter corresponding to the penalty on \mathbf{A}, the matrix with autoregression coefficients, the second to matrix \mathbf{B} containing the regression coefficients of the time-varying covariates, while the third parameter relates to the penalty on \mathbf{Ω}_{\varepsilon}, the precision matrix of the errors.

optimizer

A character (either nlm (default) or optim) specifying which optimization function should be used: nlminb (default) or constrOptim?

...

Additional arguments passed on to the loglikLOOCVVARX1-function.

Value

A numeric with the LOOCV optimal choice for the ridge penalty parameter.

Author(s)

Wessel N. van Wieringen <w.vanwieringen@vumc.nl>

References

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>.

See Also

loglikLOOCVVARX1, ridgeVARX1.

Examples

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

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

# generate time-varying covariate data
X <- dataVAR1(n, T, Ax, SigmaE)

# (auto)regression parameter matrices of VARX(1) model
A <- createA(p, topology="clique", nonzeroA=0.1, nClique=1)
B <- createA(p, topology="hub", nonzeroA=0.1, nHubs=1)

# generate data
Y <- dataVARX1(X, A, B, SigmaE, lagX=0)

# determine the optimal penalty parameter
optLambda <- optPenaltyVARX1(Y, X, rep(10^(-10), 3), rep(1000, 3), 
                             optimizer="nlm", lagX=0)

# fit VAR(1) model
ridgeVARX1(Y, X, optLambda[1], optLambda[2], optLambda[3], lagX=0)$A

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