Description Usage Arguments Value Author(s) References See Also Examples
Automatic penalty parameter selection for the VAR(2) model through maximization of the leave-one-out cross-validated (LOOCV) log-likelihood.
1 2 3 | optPenaltyVAR2(Y, lambdaMin, lambdaMax,
lambdaInit=(lambdaMin+lambdaMax)/2,
optimizer="nlm", ...)
|
Y |
Three-dimensional |
lambdaMin |
A |
lambdaMax |
A |
lambdaInit |
A |
optimizer |
A |
... |
Additional arguments passed on to loglikLOOCVVAR2. |
A numeric
with the LOOCV optimal choice for the ridge penalty parameter.
Wessel N. van Wieringen <w.vanwieringen@vumc.nl>
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # set dimensions (p=covariates, n=individuals, T=time points)
p <- 3; n <- 4; T <- 10
# set model parameters
SigmaE <- diag(p)/4
A1 <- createA(p, topology="clique", nonzeroA=0.1, nClique=1)
A2 <- createA(p, topology="hub", nonzeroA=0.1, nHubs=1)
# generate data
Y <- dataVAR2(n, T, A1, A2, SigmaE)
# determine the optimal penalty parameter
optLambda <- optPenaltyVAR2(Y, rep(10^(-10), 3), rep(1000, 3),
optimizer="nlm")
# fit VAR(2) model
ridgeVAR2(Y, optLambda[1], optLambda[2], optLambda[3])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.