optPenaltyVAR1fused: Automatic penalty parameter selection for multiple VAR(1)...

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

Description

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

Usage

1
2
3
optPenaltyVAR1fused(Y, id, 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.

id

A vector with group indices comprising of integers only. First group is represented by '0', the next by '1', and so on until the last.

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}_g's, the matrices with lag one autoregression coefficients, the second to the fused ridge parameter for these \mathbf{A}_g's, 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}_g's, the matrices with lag one autoregression coefficients, the second to the fused ridge parameter for these \mathbf{A}_g's, 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}_g's, the matrices with lag one autoregression coefficients, the second to the fused ridge parameter for these \mathbf{A}_g's, 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 loglikLOOCVVAR1fused.

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

loglikLOOCVVAR1fused, ridgeVAR1fused.

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
# set dimensions (p=covariates, n=individuals, T=time points, G=groups)
p <- 3; n <- 12; T <- 10; G <- 3

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

# generate data
Y1 <- dataVAR1(n/G, T, A1, SigmaE)
Y2 <- dataVAR1(n/G, T, A2, SigmaE)
Y3 <- dataVAR1(n/G, T, A3, SigmaE)
Y  <- abind::abind(Y1, Y2, Y3, along=3)
id <- c(rep(1, n/G), rep(2, n/G), rep(3, n/G))-1

# determine the optimal penalty parameter
## Not run: optLambdas <- optPenaltyVAR1fused(Y, rep(10^(-10), 3), 
## Not run:                rep(1000, 3), optimizer="nlm") 

# ridge ML estimation of the VAR(1) parameter estimates with 
# optimal penalty parameters
optLambdas <- c(0.1, 0.1, 0.1)
VAR1hats <- ridgeVAR1fused(Y, id, optLambdas[1], optLambdas[2], optLambdas[3])

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