Description Usage Arguments Value Note Author(s) References Examples
whites.htest
performs White's Test for Heteroskedasticity as outlined in Doornik (1996).
1 | whites.htest(var.model)
|
var.model |
requires a |
$statistic |
the test statistic |
$p.value |
the p-value |
$degrees |
the number of degrees of freedom |
$res.products |
the residual cross products matrix |
$lagged.variables |
matrix with the lagged variables |
$rcov |
the estimated Omega matrix in Doornik |
$ucov |
transpose matrix of auxiliary residuals times itself, divided by |
$call |
the function call |
This is an implementation of the heteroskedasticity test used in Eviews. For valid VAR models, the results should be identical. If not, please contact the maintainer.
Sebastian Andersson
Doornik, J. A. (1996). Testing vector error autocorrelation and heteroscedasticity. unpublished paper, Nuffield College.
1 2 3 4 | library(vars)
dataset <- data.frame(x=rnorm(100), y=rnorm(100))
model1 <- VAR(dataset, p = 1)
whites.htest(model1)
|
Loading required package: vars
Loading required package: MASS
Loading required package: strucchange
Loading required package: zoo
Attaching package: 'zoo'
The following objects are masked from 'package:base':
as.Date, as.Date.numeric
Loading required package: sandwich
Loading required package: urca
Loading required package: lmtest
White's Test for Heteroskedasticity:
====================================
No Cross Terms
H0: Homoskedasticity
H1: Heteroskedasticity
Test Statistic:
7.9485
Degrees of Freedom:
12
P-value:
0.7891
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.