resid.corr.test {BGVAR} | R Documentation |
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.
resid.corr.test(gvar.obj, lag.cor = 1, alpha = 0.95, dig1 = 5, dig2 = 3)
gvar.obj |
An object fitted by |
lag.cor |
The order of serial correlation to be tested for. Standard setting is |
alpha |
The significance level for the F-test. |
dig1 |
Number of digits used to display F-statistics and its critical values in |
dig2 |
Number of digits used to display p-values in |
Fstat |
is a list object of length |
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 |
p.res |
is a summary object showing the number and percentage of p-values (at significance level |
pL |
is a list object of length |
Martin Feldkircher
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 print.bgvar
.
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)