VARff | R Documentation |

`p`

Vector Auto(R)egressive ModelEstimates an Order(`p`

) Vector Autoregressive Models (VAR(p)) with
white noise random errors
by maximum likelihood estimation using Fisher scoring.

```
VARff(VAR.order = 1,
zero = c("var", "cov"),
lmean = "identitylink",
lvar = "loglink",
lcov = "identitylink")
```

`VAR.order` |
Length–1 (positive) integer vector. The order of the VAR to be fitted. |

`zero` |
Integer or character - string vector.
Same as |

`lmean, lvar, lcov` |
Same as |

Let `\boldsymbol{x}_t = (x_{1, t}, \ldots, x_{K, t})^T`

be a time dependent
vector of responses, with index `t = 1, \ldots, T`

,
and ```
\boldsymbol{\varepsilon}_t = (\varepsilon_{1, t},
\ldots, \varepsilon_{K, t})
```

white noise with covariance matrix
`\boldsymbol{\textrm{V}}`

.

`VARff`

fits a linear model to the means of a
`K`

–variate normal distribution, where
each variable, `x_{i, t}`

, `i = 1, \ldots, K`

,
is a linear function of `p`

–past
lags of itself and past `p`

–lags of the other variables.
The model has the form

```
\boldsymbol{x}_t = \boldsymbol{\Phi_1} \boldsymbol{x}_{t - 1} +
\cdots + \boldsymbol{\Phi_p} \boldsymbol{x}_{t - p} +
\boldsymbol{\varepsilon}_t,
```

where `\boldsymbol{\Phi_j}`

are
`K \times K`

matrices of coefficients, `j = 1, \ldots, K`

,
to be estimated.

The elements of the covariance matrix are intercept–only by default.

An object of class `"vglmff"`

(see `vglmff-class`

) to be
used by VGLM/VGAM modelling functions, e.g.,
`vglm`

or `vgam`

.

Victor Miranda.

`MVNcov`

,
`zero`

,
`Links`

,
`ECM.EngleGran`

,
`vglm`

.

```
set.seed(20170227)
nn <- 60
var.data <- data.frame(x2 = runif(nn, -2.5, 2.5))
var.data <- transform(var.data, y1 = rnorm(nn, 1.5 - 2 * x2, sqrt(exp(1.5))),
y2 = rnorm(nn, 1.0 - 1 * x2, sqrt(exp(0.75))),
y3 = rnorm(nn, 0.5 + 1 * x2, sqrt(exp(1.0))))
fit.var <- vglm(cbind(y1, y2, y3) ~ x2, VARff(VAR.order = 2),
trace = TRUE, data = var.data)
coef(fit.var, matrix = TRUE)
summary(fit.var)
vcov(fit.var)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.