VARff {VGAMextra} | R Documentation |
VGLTSM family function for the
Order–
Vector Auto(R)egressive Model
Description
Estimates an Order() Vector Autoregressive Models (VAR(p)) with
white noise random errors
by maximum likelihood estimation using Fisher scoring.
Usage
VARff(VAR.order = 1,
zero = c("var", "cov"),
lmean = "identitylink",
lvar = "loglink",
lcov = "identitylink")
Arguments
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 |
Details
Let be a time dependent
vector of responses, with index
,
and
white noise with covariance matrix
.
VARff
fits a linear model to the means of a
–variate normal distribution, where
each variable,
,
,
is a linear function of
–past
lags of itself and past
–lags of the other variables.
The model has the form
where are
matrices of coefficients,
,
to be estimated.
The elements of the covariance matrix are intercept–only by default.
Value
An object of class "vglmff"
(see vglmff-class
) to be
used by VGLM/VGAM modelling functions, e.g.,
vglm
or vgam
.
Author(s)
Victor Miranda.
See Also
MVNcov
,
zero
,
Links
,
ECM.EngleGran
,
vglm
.
Examples
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)