全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
13960 9
2012-12-23
如题:
怎么用stata检验serial-correlation 和heteroskedasticity?
相关的指令是什么呢?
非常感谢!
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2012-12-23 01:36:10
论坛上面下载
using stata for principle of econometric
microeconometrics using stata
an introduction to modern econometrics using stata
高级计量经济学及stata应用

这些书上都有详细介绍和例子
这些书论坛上都有下载
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-12-23 01:55:41
heteroskedesticity case:

/*DGP*/
clear
set obs 1000
gen x1=rnormal()
gen x2=rnormal()*1.6
gen u=x1*x2*rnormal()
scalar bo=1
scalar b1=0.5
scalar b2=1.5
gen y=bo+b1*x1+b2*x2+u

/* simple OLS*/
reg y x1 x2
/* white test-method 1*/
estat imt,wh
/* white test-method 2*/
reg y x*
predictnl e2=(y-xb())^2
reg e2 x* c.x*#c.x*
di "Chi2(" e(df_m) ")="   e(r2)*e(N)
di "P=" chi2tail(e(df_m),e(r2)*e(N))



if you prefer the familiar case, see below

sysuse auto
reg price mpg rep78
estat hettest
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-12-23 01:59:25
serial-correlation case

i prefer using xtserial for serial-correlation for panel data

however, most commenly used method is dw test (AR(1)).

example given by stata inc.


    . webuse klein
    . tsset yr
    . regress consump wagegovt
    . estat dwatson
    . estat durbinalt, small





二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-12-23 03:22:44
005C:下面有几本书是关于计量经济学与stata结合的书,
         把这几本书看了,计量经济学的一般问题都可以解决。
        (1)Microeconometrics using stata ( Cameron , Trivedi-2009)
             https://bbs.pinggu.org/thread-627149-1-1.html
        (2)Using Stata For Principles of Econometrics(3rd Edition)
             https://bbs.pinggu.org/thread-393735-1-1.html
        (3)An Introduction to Modern Econometrics Using Stata
             https://bbs.pinggu.org/thread-1103569-1-1.html
         (4)Regression with Stata
                 http://www.ats.ucla.edu/stat/stata/webbooks/reg/default.htm
         (5)山东大学陈强老师的《高级计量经济学及stata应用》
           https://bbs.pinggu.org/thread-1388472-1-1.html

     005D:与计量经济模型相关的检验的命令如何查找到?
                 学习计量经济学要做 异方差(white test、BP test)、序列相关、hausman等检验,
         如何知道该采用什么命令?
                查看估计命令的help菜单,如reg,在该菜单的右上方有相关的命令的链接( postestimation )

           例如: 查看 regress命令的help,在help界面右上方中有
                       [R]  regress postestimation -- Postestimation tools for regress
                       [R] regress postestimation time series -- Postestimation tools for regress with time series
                      这就是估计后的可以使用的各种命令,如预测predict、white等。

                     点击 [R] regress postestimation -- Postestimation tools for regress,进入新的界面,包括下面信息

Title
    [R] regress postestimation -- Postestimation tools for regress

Description
    The following postestimation commands are of special interest after regress:
    Command            Description
    ------------------------------------------------------------------------------------------------------------------
    dfbeta             DFBETA influence statistics
    estat hettest      tests for heteroskedasticity
    estat imtest       information matrix test
    estat ovtest       Ramsey regression specification-error test for omitted variables
    estat szroeter     Szroeter's rank test for heteroskedasticity
    estat vif          variance inflation factors for the independent variables
    acprplot           augmented component-plus-residual plot
    avplot             added-variable plot
    avplots            all added-variable plots in one image
    cprplot            component-plus-residual plot
    lvr2plot           leverage-versus-squared-residual plot
    rvfplot            residual-versus-fitted plot
    rvpplot            residual-versus-predictor plot
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2012-12-24 00:56:45
fgleric 发表于 2012-12-23 01:59
serial-correlation case

i prefer using xtserial for serial-correlation for panel data
没看懂,求解释= =
我的是panel data,您给的这个example中,用的是regress,是直接用OLS方法进行回归吗?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群