# loglikVAR1: Log-likelihood of the VAR(1) model.

### Description

Log-likelihood of the VAR(1) model specified by the supplied parameters

### Usage

 1 loglikVAR1(Y, A, P, unbalanced=matrix(nrow=0, ncol=2)) 

### Arguments

 Y Three-dimensional array containing the data. The first, second and third dimensions correspond to covariates, time and samples, respectively. The data are assumed to be centered covariate-wise. A A matrix \mathbf{A} of auto-regression parameters. P Inverse error covariance matrix \mathbf{Ω}_{\varepsilon} (=\mathbf{Σ_{\varepsilon}^{-1}}). unbalanced A matrix with two columns, indicating the unbalances in the design. Each row represents a missing design point in the (time x individual)-layout. The first and second column indicate the time and individual (respectively) specifics of the missing design point.

### Value

The log-likelihood of the VAR(1) model with supplied parameters.

### Author(s)

Wessel N. van Wieringen <w.vanwieringen@vumc.nl>

ridgeVAR1.

### Examples

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 # set dimensions 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) 

Search within the ragt2ridges package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.