Description Usage Arguments Value Author(s) See Also Examples
Log-likelihood of the VAR(1) model specified by the supplied parameters
1  | loglikVAR1(Y, A, P, unbalanced=matrix(nrow=0, ncol=2))
 | 
Y | 
  Three-dimensional   | 
A | 
  A   | 
P | 
  Inverse error covariance   | 
unbalanced | 
  A   | 
The log-likelihood of the VAR(1) model with supplied parameters.
Wessel N. van Wieringen <w.vanwieringen@vumc.nl>
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 the log-likelihood of this fit.
loglikVAR1(Y, VAR1hat$A, VAR1hat$P)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.