楼主: jianlamhua
8167 9

请问:自相关 [推广有奖]

  • 0关注
  • 1粉丝

大专生

70%

还不是VIP/贵宾

-

威望
0
论坛币
391 个
通用积分
0.0019
学术水平
1 点
热心指数
1 点
信用等级
1 点
经验
818 点
帖子
62
精华
0
在线时间
20 小时
注册时间
2007-7-5
最后登录
2018-1-11

楼主
jianlamhua 发表于 2009-5-4 23:49:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

请教,输入“estat dwatson”或“estat durbinalt”,结果窗口显示“sample may not include multiple panels”。

我的数据年度是04--06年,已经tsset id year。

这是什么原因呢?谢谢!

我需要DW统计量,不知这样是否有误?

二维码

扫码加我 拉你入群

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

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

关键词:自相关 Multiple include Watson Panels 自相关

沙发
蓝色 发表于 2009-5-5 07:11:00

那个命令是不能做面板数据的

而且才3年的数据

藤椅
蓝色 发表于 2009-5-5 07:15:00

Title

    [R] regress postestimation time series -- Postestimation tools for regress with time series


Description

    The following postestimation commands for time series are available after 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.

    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 LM 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 to test for first-order serial correlation in the
    disturbance when all the regressors are strictly exogenous.

帮助的上面也写了是regress postestimation 的检验,而不是面板panel的检验。


板凳
蓝色 发表于 2009-5-5 07:22:00

--------------------------------------------------------------------------------------------------------------------
help for xtserial                                                                                    (SJ3-2: st0039)
--------------------------------------------------------------------------------------------------------------------

Wooldridge test for serial correlation in panel-data models

        xtserial depvar [varlist] [if exp] [in range] [, output]

    You must tsset your data before using xtserial; see help tsset.


Description

    xtserial implements a test for serial correlation in the idiosyncratic errors of a linear panel-data model
    discussed by Wooldridge (2002).  Drukker (2003) presents simulation evidence that this test has good size and
    power properties in reasonable sample sizes.

    Under the null of no serial the residuals from the regression of the first-differenced variables should have
    an autocorrelation of -.5.  This implies that the coefficient on the lagged residuals in a regression of the
    lagged residuals on the current residuals should be -.5.  xtserial performs a Wald test of this hypothesis.
    See Drukker (2003) and Wooldridge (2002) for further details.


Options

    output specifies that the output from the first-differenced regression should be displayed.  By default, the
        first-differenced regression output is not displayed.


Examples

    . xtserial ln_wage age* ttl_exp tenure* south, output


References

    Drukker, D. M. 2003.  Testing for serial correlation in linear panel-data models.  Stata Journal (3)2:
        168-177.

    Wooldridge, J. M.  2002.  Econometric Analysis of Cross Section and Panel Data.  Cambridge, MA: MIT Press.

报纸
jianlamhua 发表于 2009-5-5 15:48:00

谢谢蓝版:)

不过我不是面板数据,我的样本是混合截面数据(三年的数据混合)。

我regress y x1 x2后,输入“estat dwatson”或“estat durbinalt”,

结果窗口显示“time variable not set, use -tsset varname ...-”。

然后我就用tsset设置tsset id year。(估计是这设置有问题?)

要怎么处理呢?

谢谢啦。。。

地板
蓝色 发表于 2009-5-5 18:08:00
以下是引用jianlamhua在2009-5-5 15:48:00的发言:

谢谢蓝版:)

不过我不是面板数据,我的样本是混合截面数据(三年的数据混合)。

我regress y x1 x2后,输入“estat dwatson”或“estat durbinalt”,

结果窗口显示“time variable not set, use -tsset varname ...-”。

然后我就用tsset设置tsset id year。(估计是这设置有问题?)

要怎么处理呢?

谢谢啦。。。

你的数据保证每年对于一个样本就没有问题的。

如果你是每年对于不同的样本,那也会出现问题的。

7
jianlamhua 发表于 2009-5-5 23:06:00

中国资本市场的数据似乎很难做到每年对于相同的样本(在面板数据里叫平衡面板??)。所以我的数据每年样本不一样,有的缺失数据。

像我这种混合截面数据,怎么检验自相关呢?

我看期刊上很多文章是类似的混合截面数据,报告的是DW统计量。

在stata里怎么操作呢?

我看stata的help菜单,似乎就是直接输入“estat dwatson”或“estat durbinalt”。

再次谢谢!

8
sophiafinn 发表于 2011-5-4 22:10:24
原来如此,多谢解惑~
4# 蓝色

9
fengqufu3 发表于 2022-8-29 14:35:49
jianlamhua 发表于 2009-5-5 23:06
中国资本市场的数据似乎很难做到每年对于相同的样本(在面板数据里叫平衡面板??)。所以我的数据每年样本 ...
同问!请问解决了吗

10
赵安豆 发表于 2024-5-7 12:33:40
这个错误信息意味着您的数据集可能不支持执行自相关检验,因为“estat dwatson”和“estat durbinalt”命令要求样本包含多个时间段或观测。在您的情况下,数据仅包含三个连续的年度(04-06年),这可能太少了,无法进行有效的面板数据自相关检验。

DW统计量通常用于检验时间序列数据中的一阶自相关。如果您只想对单个变量进行DW检验,可以使用“dwstat”命令,而不是在面板数据上下文中使用。然而,请注意,对于只有三个观测值的时间序列,这个检验可能也不太可靠。

建议您考虑增加年份以获取更可靠的面板数据检验,或者如果您的目的是检查时间序列自相关,尝试使用更多年度的数据。如果您确信三年数据已经足够并且想要进行DW统计量计算,可以尝试不设为面板数据(即,不需要“tsset”),然后运行“dwstat”命令,但这样可能并不完全符合您的研究需求。

此文本由CAIE学术大模型生成,添加下方二维码,优先体验功能试用



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

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