# White Test whites.htest test

Hi, This question is regarding white test.
When I do the white stadistic mannually
I did the auxiliary regresion
The White stadistic is n*R^2 = 13.6998
But when I use the function whited.htest the Test stadistic is 25.8605.

Here you have the details:

``````#  Update the data
# Create the Regresion.
# Create the Regresion.
summary(regresion)
##
## Call:
## lm(formula = ID ~ Utilidades, data = datos)
##
## Residuals:
##     Min      1Q  Median      3Q     Max
## -6627.6 -1255.6  -256.5  1216.3  5915.1
##
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)
## (Intercept) 114.39061  959.03765   0.119 0.906541
## Utilidades    0.36316    0.08915   4.073 0.000884 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2676 on 16 degrees of freedom
## Multiple R-squared:  0.5091, Adjusted R-squared:  0.4784
## F-statistic: 16.59 on 1 and 16 DF,  p-value: 0.0008844
# Create the White test Manualy
residuos<-residuals(regresion)

residuos2<-residuos^2
residuos2
# Creating the Auxiliary regresion.

summary(regresion2)
##
## Call:
##
## Residuals:
##       Min        1Q    Median        3Q       Max
## -12878603  -3082841    396014   3403670   9796936
##
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)
## (Intercept)        3.515e+06  3.063e+06   1.148  0.26913
## datos\$Utilidades  -1.583e+03  8.065e+02  -1.963  0.06853 .
## datos\$Utilidades2  1.355e-01  3.705e-02   3.656  0.00234 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 6446000 on 15 degrees of freedom
## Multiple R-squared:  0.7611, Adjusted R-squared:  0.7293
## F-statistic:  23.9 on 2 and 15 DF,  p-value: 2.168e-05
R2= 0.7611
n=18
n.R2=n*R2
n.R2
## [1] 13.6998

model1<-var(datos)
model1 <- VAR(dataset, p = 1)
whites.htest(model1)
##
## White's Test for Heteroskedasticity:
## ====================================
##
##  No Cross Terms
##
##  H0: Homoskedasticity
##  H1: Heteroskedasticity
##
##  Test Statistic:
##  25.8605
##
##  Degrees of Freedom:
##  12
##
##  P-value:
##  0.0112
``````

On a quick look, it seems that in the first case you are doing a regression and in the second case a vector autoregression? Note the difference in the degrees of freedom.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.