whites.htest: White's Test for Heteroskedasticity

Description Usage Arguments Value Note Author(s) References Examples

View source: R/white_r.R

Description

whites.htest performs White's Test for Heteroskedasticity as outlined in Doornik (1996).

Usage

1
whites.htest(var.model)

Arguments

var.model

requires a varest object. Currently, the function does not support varest objects without a trend/intercept (but both may be used), with restrictions or with exogenous variables.

Value

$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 T - k

$call

the function call

Note

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.

Author(s)

Sebastian Andersson

References

Doornik, J. A. (1996). Testing vector error autocorrelation and heteroscedasticity. unpublished paper, Nuffield College.

Examples

1
2
3
4
library(vars) 
dataset <- data.frame(x=rnorm(100), y=rnorm(100)) 
model1 <- VAR(dataset, p = 1) 
whites.htest(model1) 

Example output

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 

het.test documentation built on May 1, 2019, 6:31 p.m.