Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

resid.corr.test

Residual Autocorrelation Test


Description

An F-test for serial autocorrelation in the residuals.

Usage

residual.corr.test(obj, lag.cor=1, alpha=0.95, dig1=5, dig2=3)

Arguments

obj

an object of class bgvar.

lag.cor

the order of serial correlation to be tested for. Default is set to lag.cor=1.

alpha

significance level of test. Default is set to alpha=0.95.

dig1

number of digits to display F-statistics and its critical values.

dig2

number of digits to display p-values.

Details

It is the F-test of the familiar Lagrange Multiplier (LM) statistic (see Godfrey 1978a, 1978b), also known as the 'modified LM' statistic. The null hypothesis is that rho, the autoregressive parameter on the residuals, equals 0 indicating absence of serial autocorrelation. For higher order serial correlation, the null is that all rho's jointly are 0. The test is implemented as in Vanessa Smith's and Alessandra Galesi's ”GVAR toolbox 2.0 User Guide”, page 129.

Value

Returns a list with the following objects

  • Fstat contains a list of length N with the associated F-statistic for each variable in each country.

  • resTest contains a matrix of size 2N times K+3, with the F-statistics for each country and each variable.

  • p.res contains a table which summarizes the output.

  • pL contains a list of length N with the associated p-values for each variable in each country.

Author(s)

Martin Feldkircher

References

Godfrey, L.G. (1978a) Testing Against General Autoregressive and Moving Average Error Models When the Regressors Include Lagged Dependent Variables. Econometrica, 46, pp. 1293-1302. Godfrey, L.G. (1978b) Testing for Higher Order Serial Correlation in Regression Equations When the Regressors Include Lagged Dependent Variables. Econometrica, 46, pp. 1303-1310. Smith, L. V. and A. Galesi (2014) GVAR Toolbox 2.0 User Guide, available at https://sites.google.com/site/gvarmodelling/gvar-toolbox.

Examples

library(BGVAR)
data(eerDatasmall)
model.mn <- bgvar(Data=eerDatasmall,W=W.trade0012.small,draws=100,burnin=100,plag=1,prior="MN")
residual.corr.test(model.mn)

BGVAR

Bayesian Global Vector Autoregressions

v2.2.0
GPL-3
Authors
Maximilian Boeck [aut, cre] (<https://orcid.org/0000-0001-6024-8305>), Martin Feldkircher [aut] (<https://orcid.org/0000-0002-5511-9215>), Florian Huber [aut] (<https://orcid.org/0000-0002-2896-7921>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.