楼主: Menxinxin
14047 9

如何用stata做serial-correlation 检验和heteroskedasticity 检验? [推广有奖]

  • 1关注
  • 0粉丝

硕士生

60%

还不是VIP/贵宾

-

威望
0
论坛币
59 个
通用积分
0
学术水平
0 点
热心指数
1 点
信用等级
0 点
经验
3044 点
帖子
123
精华
0
在线时间
87 小时
注册时间
2012-12-6
最后登录
2017-3-27

楼主
Menxinxin 发表于 2012-12-23 01:19:19 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
如题:
怎么用stata检验serial-correlation 和heteroskedasticity?
相关的指令是什么呢?
非常感谢!
二维码

扫码加我 拉你入群

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

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

关键词:correlation relation HETERO serial Stata 检验 如何

回帖推荐

fgleric 发表于5楼  查看完整内容

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 01:36:10 来自手机
论坛上面下载
using stata for principle of econometric
microeconometrics using stata
an introduction to modern econometrics using stata
高级计量经济学及stata应用

这些书上都有详细介绍和例子
这些书论坛上都有下载
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
Menxinxin + 1 + 1 + 1 多谢啦~!

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

藤椅
fgleric 发表于 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

板凳
fgleric 发表于 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





已有 1 人评分热心指数 信用等级 收起 理由
Menxinxin + 1 + 1 很有启发

总评分: 热心指数 + 1  信用等级 + 1   查看全部评分

报纸
蓝色 发表于 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

地板
Menxinxin 发表于 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方法进行回归吗?

7
fgleric 发表于 2012-12-24 01:05:47
Menxinxin 发表于 2012-12-24 00:56
没看懂,求解释= =
我的是panel data,您给的这个example中,用的是regress,是直接用OLS方法进行回归吗? ...
如果是panel data,用xtserial

reg直接执行OLS,处理cross section数据

8
Menxinxin 发表于 2012-12-24 01:09:45
fgleric 发表于 2012-12-24 01:05
如果是panel data,用xtserial

reg直接执行OLS,处理cross section数据
显示:unrecognized command:  xtserial
是什么意思= =
而且在help里面也找不到这个命令的帮助内容。。。

9
fgleric 发表于 2012-12-24 01:32:32
Menxinxin 发表于 2012-12-24 01:09
显示:unrecognized command:  xtserial
是什么意思= =
而且在help里面也找不到这个命令的帮助内容。。 ...
呵呵,自己去下载

ssc install xtserial
已有 1 人评分学术水平 热心指数 信用等级 收起 理由
Menxinxin + 1 + 1 + 1 豁然开朗

总评分: 学术水平 + 1  热心指数 + 1  信用等级 + 1   查看全部评分

10
Menxinxin 发表于 2012-12-24 01:38:41
fgleric 发表于 2012-12-24 01:32
呵呵,自己去下载

ssc install xtserial
豁然开朗!
明白了,需要自己下载工具包,我去下载来试试看~!!

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-22 12:27