很截面数据你还做dw检验吗
针对不同的回归,有不用的检验命令
所以你的看书
看stata的手册
Title
[R] regress postestimation time series -- Postestimation tools for regress with time series
Description
The following postestimation commands for time series are available for regress:
Command Description
--------------------------------------------------------------------------------------------------------------------------------
estat archlm test for ARCH effects in the residuals
estat bgodfrey Breusch-Godfrey test for higher-order serial correlation
estat durbinalt Durbin's alternative test for serial correlation
estat dwatson Durbin-Watson d statistic to test for first-order serial correlation
--------------------------------------------------------------------------------------------------------------------------------
Special-interest postestimation commands
These commands provide regression diagnostic tools specific to time series. You must tsset your data before using these commands; see [TS] tsset.
estat archlm tests for time-dependent volatility. estat dwatson, estat durbinalt, and estat bgodfrey test for serial correlation in the residuals of a linear regression. For non-time-series regression diagnostic tools, see [R] regress postestimation.
estat archlm performs Engle's Lagrange multiplier test for the presence of autoregressive conditional heteroskedasticity.
estat bgodfrey performs the Breusch-Godfrey test for higher-order serial correlation in the disturbance. This test does not require that all the regressors be strictly exogenous.
estat durbinalt performs Durbin's alternative test for serial correlation in the disturbance. This test does not require that
all the regressors be strictly exogenous.
estat dwatson computes the Durbin-Watson d statistic (Durbin and Watson 1950) to test for first-order serial correlation in the disturbance when all the regressors are strictly exogenous.
Syntax for estat archlm
estat archlm [, archlm_options]
archlm_options Description
--------------------------------------------------------------------------------------------------------------------------------
lags(numlist) test numlist lag order
force allow test after regress, vce(robust)
--------------------------------------------------------------------------------------------------------------------------------
Options for estat archlm
lags(numlist) specifies a list of numbers, indicating the lag orders to be tested. The test will be performed separately for
each order. The default is order one.
force allows the test to be run after regress, vce(robust). The command will not work if the vce(cluster clustvar) option is
specified with regress.
Syntax for estat bgodfrey
estat bgodfrey [, bgodfrey_options]
bgodfrey_options Description
--------------------------------------------------------------------------------------------------------------------------------
lags(numlist) test numlist lag orders
nomiss0 do not use Davidson and MacKinnon's approach
small obtain p-values using the F or t distribution
--------------------------------------------------------------------------------------------------------------------------------
Options for estat bgodfrey
lags(numlist) specifies a list of numbers, indicating the lag orders to be tested. The test will be performed separately for
each order. The default is order one.
nomiss0 specifies that Davidson and MacKinnon's approach (1993, 358), which replaces the missing values in the initial
observations on the lagged residuals in the auxiliary regression with zeros, not be used.
small specifies that the p-values of the test statistics be obtained using the F or t distribution instead of the default
chi-squared or normal distribution.
Syntax for estat durbinalt
estat durbinalt [, durbinalt_options]
durbinalt_options Description
--------------------------------------------------------------------------------------------------------------------------------
lags(numlist) test numlist lag orders
nomiss0 do not use Davidson and MacKinnon's approach
robust compute standard errors using the robust/sandwich estimator
small obtain p-values using the F or t distribution
force allow test after regress, vce(robust) or newey
--------------------------------------------------------------------------------------------------------------------------------
Options for estat durbinalt
lags(numlist) specifies a list of numbers, indicating the lag orders to be tested. The test will be performed separately for
each order. The default is order one.
nomiss0 specifies that Davidson and MacKinnon's approach (1993, 358), which replaces the missing values in the initial
observations on the lagged residuals in the auxiliary regression with zeros, not be used.
robust specifies that the Huber/White/sandwich robust estimator for the variance-covariance matrix be used in Durbin's
alternative test.
small specifies that the p-values of the test statistics be obtained using the F or t distribution instead of the default
chi-squared or normal distribution. This option may not be specified with robust, which always uses an F or t distribution.
force allows the test to be run after regress, vce(robust) and after newey. The command will not work if the vce(cluster
clustvar) option is specified with regress.
Syntax for estat dwatson
estat dwatson
Examples
----------------------------------------------------------------------------------------------------------------------------------
. webuse klein
. tsset yr
. regress consump wagegovt
. estat dwatson
. estat durbinalt, small
----------------------------------------------------------------------------------------------------------------------------------
. webuse klein
. tsset yr
. regress consump wagegovt L.consump L2.consump
. estat durbinalt, small lags(1/2)
. estat bgodfrey, small lags(1/2)
----------------------------------------------------------------------------------------------------------------------------------
. webuse klein
. tsset yr
. regress consump wagegovt
. estat archlm, lags(1 2 3)
----------------------------------------------------------------------------------------------------------------------------------
Saved results
estat archlm saves the following in r():
Scalars
r(N) number of observations
r(k) number of regressors
r(N_gaps) number of gaps
Macros
r(lags) lag order
Matrices
r(arch) test statistic for each lag order
r(df) degrees of freedom
r(p) two-sided p-values
estat bgodfrey saves the following in r():
Scalars
r(N) number of observations
r(k) number of regressors
r(N_gaps) number of gaps
Macros
r(lags) lag order
Matrices
r(chi2) chi-squared statistic for each lag order
r(F) F statistic for each lag order (small only)
r(df_r) residual degrees of freedom (small only)
r(p) two-sided p-values
r(df) degrees of freedom
estat durbinalt saves the following in r():
Scalars
r(N) number of observations
r(k) number of regressors
r(N_gaps) number of gaps
Macros
r(lags) lag order
Matrices
r(chi2) chi-squared statistic for each lag order
r(F) F statistic for each lag order (small only)
r(df_r) residual degrees of freedom (small only)
r(p) two-sided p-values
r(df) degrees of freedom
estat dwatson saves the following in r():
Scalars
r(N) number of observations
r(k) number of regressors
r(N_gaps) number of gaps
r(dw) Durbin-Watson statistic
References
Davidson, R., and J. G. MacKinnon. 1993. Estimation and Inference in Econometrics. New York: Oxford University Press.
Durbin, J., and G. S. Watson. 1950. Testing for serial correlation in least squares regression. I. Biometrika 37: 409-428.
|