Biology Reference
In-Depth Information
(i.e., the baseline value) to the model. Other possible values are
none
for a model
without the intercept,
> VAR(Canada, p = 2, type = "none")
trend
for a model with a linear trend term,
> VAR(Canada, p = 2, type = "trend")
and
both
to add both the intercept and a linear trend to the model.
> VAR(Canada, p = 2, type = "both")
The
p
argument specifies the order of the vector auto-regressive process.
The optimal lag order for the VAR process can be estimated using information
criteria such as the Akaike Information Criterion (
ic = "AIC"
, the default) or
the Schwarz Criterion (
ic = "SC"
). An upper bound must be specified with the
lag.max
argument, i.e.,
lag.max = 4
.
> VAR(Canada, lag.max = 4, ic = "AIC")
> VAR(Canada, lag.max = 4, ic = "SC")
Several approaches to verify the covariance stationarity of a VAR process are
implemented in the
stability
function; the default one computes the
cumula-
tive sums
of the residuals (
OLS-CUSUM
) of the process, which can be used for an
exploratory analysis.
> var.2c = VAR(Canada, p = 2, type = "const")
> stab = stability(var.2c, type = "OLS-CUSUM")
> plot(stab)
The Jarque-Bera normality tests for univariate and multivariate series are imple-
mented in the
normality.test
function and are applied to the residuals of the
VA R (
p
). Skewness and kurtosis tests are computed at the same time.
> normality.test(var.2c)
By default,
normality.test
computes the multivariate Jarque-Bera test on the
standardized residuals. It is important to note that the results of this test depend
on the ordering of the variables. The univariate Jarque-Bera tests for the variables
in the VAR process can also be computed by setting
multivariate.only
to
FALSE
.
> normality.test(var.2c, multivariate.only = FALSE)
Other diagnostic tests from Sect.
3.1.2
, such as testing for the absence of auto-
correlation, heteroscedasticity, or non-normality in the errors, are also available in
vars
. For example, the function
serial.test
implements the Portmanteau test
and the Breusch-Godfrey serial correlation Lagrange multiplier test for the serial
correlation.
> serial.test(var.2c, lags.pt = 16,
+
type = "PT.adjusted")
Portmanteau Test (adjusted)
data: Residuals of VAR object var.2c
Chi-squared = 231.5907, df = 224, p-value = 0.3497
Search WWH ::
Custom Search