Minot
Using Stata for Survey Analysis
Page 52
hettest
Another assumption behind regression analysis is that the variance of the error term is
constant across
the sample. When
this assumption is violated, the problem is called heteroskedasticity. This
command tests for heteroskedasticity.
hettest [varlist]
This command tests t=0 in Var(e)=s^2exp(zt). If varlist is not specified, the fitted
values are used for z. If varlist is specified, the variables specified are used for z.
This test is also known as the Breusch-Pagan test for heteroskedasticity. Examples are:
regress y x1 x2 x3
hettest
test whether variance related to predicted y
hettest x3
test whether variance related to x3
Example 24 gives the result of some tests related to the regression analysis shown earlier. The
testparm command tests the hypothesis that both the region coefficients are equal to zero (that region
does not influence rice expenditure).
The hypothesis is rejected, meaning that the regional
coefficients are jointly significant. The
ovtest rejects the hypothesis that there are
no omitted
variables, indicating that we need to improve the specification (prices would be a good start). And
finally,
hettest indicates that there is heteroskedasticity which needs to be addressed.
Do'stlaringiz bilan baham: