Stata有现成的命令
回归完执行 estat ovtest
Syntax for estat ovtest
estat ovtest [, rhs]
Menu for estat
Statistics > Postestimation > Reports and statistics
Description for estat ovtest
estat ovtest performs two versions of the Ramsey (1969) regression specification-error test (RESET) for
omitted variables. This test amounts to fitting y=xb+zt+u and then testing t=0. If the rhs option is
not specified, powers of the fitted values are used for z. If rhs is specified, powers of the
individual elements of x are used.
Option for estat ovtest
rhs specifies that powers of the right-hand-side (explanatory) variables be used in the test rather
than powers of the fitted values.
---------------------------------------------------------------------------------------------------------
Setup
. sysuse auto, clear
. regress price weight foreign##c.mpg
DFITS influence measure
. predict dfits, dfits
Cook's distance
. predict cooksd if e(sample), cooksd
Welsch distance
. predict wd, welsch
COVRATIO influence measure
. predict covr, covratio
DFBETAs influence measure
. sort foreign make
. predict dfor, dfbeta(1.foreign)
DFBETAs for all variables in regression
. dfbeta
Ramsey's test for omitted variables
. estat ovtest
Test for heteroskedasticity
. estat hettest
. estat hettest weight foreign##c.mpg, mtest(b)
Rank test for heteroskedasticity
. estat szroeter, rhs mtest(holm)
Tests for heteroskedasticity, skewness, and kurtosis
. estat imtest
|