resid.corr.test {BGVAR}R Documentation

Residual autocorrelation test

Description

An F-test for residual serial correlation. It is the F-version of the familiar Lagrange Multiplier (LM) statistic (see Godfrey 1978a, 1978b), also known as "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.

Usage

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

Arguments

gvar.obj

An object fitted by bgvar.

lag.cor

The order of serial correlation to be tested for. Standard setting is lag.cor=1.

alpha

The significance level for the F-test.

dig1

Number of digits used to display F-statistics and its critical values in resTest.

dig2

Number of digits used to display p-values in resTest.

Value

Fstat

is a list object of length N that contains the F-statistics for each tested variable.

resTest

is an overview object that shows for each country and each variable the value of the F-statistic, its critical value, the degrees of freedom and the p-values (in brackets) at the significance level alpha. Can be exportet to latex invoking the package xtable.

p.res

is a summary object showing the number and percentage of p-values (at significance level alpha) >0.1, between 0.05-0.1, 0.01-0.05 and <0.01. This is also what is used by print.bgvar

pL

is a list object of length N that contains the p-values (at significance level alpha) for each tested variable.

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. In: 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. In: 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.

See Also

See also print.bgvar.

Examples

library(BGVAR)
data(monthlyData)
model.sims<-bgvar(Data=new.data,W=W,saves=100,burns=100,plag=1,hyperparm=NULL,Cpu=1,prior="SIMS",save_thin=1,eigen=TRUE,logfile=FALSE,stats=TRUE)
resid.corr.test(model.sims)

[Package BGVAR version 1.1.3 Index]