Description Usage Arguments Value Author(s) See Also Examples
View source: R/evaluateVAR1fit.r
Simple plots for assessment of the fit of an estimated VAR(1) model.
1 2 |
Y |
Three-dimensional |
A |
A |
SigmaE |
Covariance |
unbalanced |
A |
diag |
A |
fileType |
A |
dir |
A |
Plots are saved in the specified directory.
Wessel N. van Wieringen <w.vanwieringen@vumc.nl>
evaluateSfit
, ridgeVAR1
, dataVAR1
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # 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)
# center data
Y <- centerVAR1data(Y)
# fit VAR(1) model
VAR1hat <- ridgeVAR1(Y, 1, 1)
# evaluate fit VAR(1) model
## Not run: evaluateVAR1fit(Y, VAR1hat$A, symm(VAR1hat$P))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.