Description Usage Arguments Details Author(s) See Also Examples
View source: R/ridgePathVAR1.r
Function that visualizes the regularization paths of the parameters of the VAR(1) model. The elements of the ridge ML estimate of either \mathbf{A} or (possibly standardized, inverse of) \mathbf{Σ}_{\varepsilon} are plotted against a specified range of their penalty parameter (keeping the other penalty parameter fixed).
1 2 | ridgePathVAR1(Y, lambdaAgrid, lambdaPgrid, pathType="A",
plotTypeSigmaE="pcor", diag=FALSE, verbose=TRUE, ...)
|
Y |
Three-dimensional |
lambdaAgrid |
A |
lambdaPgrid |
A |
pathType |
A |
plotTypeSigmaE |
A |
diag |
A |
verbose |
A |
... |
Other arguments to be passed to |
If pathType="A"
, the regularization paths of \mathbf{A} will be evaluated for λ_{ω} equal to the minimum value of lambdaPgrid
. If pathType="SigmaE"
, the regularization paths of (inverse of / possibly standardarized) \mathbf{Σ}_{\varepsilon} will be evaluated for λ_a equal to the minimum value of lambdaAgrid
.
Regularization paths may be visualized for (partial) correlations, covariances and precision elements. The type of element for which a visualization of the regularization paths is desired can be indicated by the argument plotType
.
The arguments diag
and plotTypeSigmaE
are ignored when pathType="A"
.
Wessel N. van Wieringen <w.vanwieringen@vumc.nl>.
ridgePathS
, ridgeP
, ridgeVAR1
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # set dimensions (p=covariates, n=individuals, T=time points)
p <- 3; n <- 4; T <- 10
# set model parameters
SigmaE <- diag(p)/4
A <- createA(p, "chain")
# generate data
Y <- dataVAR1(n, T, A, SigmaE)
## Visualize regularization paths
lambdaAgrid <- seq(0.01, 1, length.out=20)
lambdaPgrid <- seq(0.01, 1, length.out=20)
ridgePathVAR1(Y, lambdaAgrid, lambdaPgrid, pathType="A")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.