全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
42032 18
2013-06-04
   很多人在面板数据不知道如何用命令检测协整,包括LLC、HT、Breitung、IPS、Fisher等结果,其实非常简单只需要遵循以下两步:

第一步:安装 xtuniroot命令, ssc install xtunitroot
第二步:如何检验,命令为  xtunitroot +LLC?(检验方式), lags(?)就可以了。具体的命令见下面help 文件:







Title

    [XT] xtunitroot -- Panel-data unit-root tests


Syntax

    Levin-Lin-Chu test

        xtunitroot llc varname [if] [in] [, LLC_options]


    Harris-Tzavalis test

        xtunitroot ht varname [if] [in] [, HT_options]


    Breitung test

        xtunitroot breitung varname [if] [in] [, Breitung_options]


    Im-Pesaran-Shin test

        xtunitroot ips varname [if] [in] [, IPS_options]


    Fisher-type tests (combining p-values)

        xtunitroot fisher varname [if] [in], {dfuller | pperron} lags(#) [Fisher_options]


    Hadri Lagrange multiplier stationarity test

        xtunitroot hadri varname [if] [in] [, Hadri_options]


    LLC_options            Description
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    trend                  include a time trend
    noconstant             suppress panel-specific means
    demean                 subtract cross-sectional means
    lags(lag_spec)         specify lag structure for augmented Dickey-Fuller (ADF) regressions
    kernel(kernel_spec)    specify method to estimate long-run variance
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    lag_spec is either a nonnegative integer or one of aic, bic, or hqic followed by a positive integer.
    kernel_spec takes the form kernel maxlags, where kernel is one of bartlett, parzen, or quadraticspectral and maxlags is either a positive number or one of nwest or llc.


    HT_options             Description
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    trend                  include a time trend
    noconstant             suppress panel-specific means
    demean                 subtract cross-sectional means
    altt                   make small-sample adjustment to T
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


    Breitung_options       Description
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    trend                  include a time trend
    noconstant             suppress panel-specific means
    demean                 subtract cross-sectional means
    robust                 allow for cross-sectional dependence
    lags(#)                specify lag structure for prewhitening
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


    IPS_options            Description
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    trend                  include a time trend
    demean                 subtract cross-sectional means
    lags(lag_spec)         specify lag structure for ADF regressions
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    lag_spec is either a nonnegative integer or one of aic, bic, or hqic followed by a positive integer.


    Fisher_options         Description
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    * dfuller              use ADF unit-root tests
    * pperron              use Phillips-Perron unit-root tests
    * lags(#)              specify lag structure for prewhitening
      demean               subtract cross-sectional means
      dfuller_opts         any options allowed by the dfuller command
      pperron_opts         any options allowed by the pperron command
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    * Either dfuller or pperron is required.
    * lags(#) is required.


    Hadri_options          Description
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    trend                  include a time trend
    demean                 subtract cross-sectional means
    robust                 allow for cross-sectional dependence
    kernel(kernel_spec)    specify method to estimate long-run variance
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    kernel_spec takes the form kernel [#], where kernel is one of bartlett, parzen, or quadraticspectral and # is a positive number.


Menu

    Statistics > Longitudinal/panel data > Unit-root tests


Description

    xtunitroot performs a variety of tests for unit roots (or stationarity) in panel datasets.  The Levin-Lin-Chu (2002), Harris-Tzavalis (1999), Breitung (2000; Breitung and Das 2005), Im-Pesaran-Shin (2003), and
    Fisher-type (Choi 2001) tests have as the null hypothesis that all the panels contain a unit root.  The Hadri (2000) Lagrange multiplier (LM) test has as the null hypothesis that all the panels are (trend)
    stationary.  The top of the output for each test makes explicit the null and alternative hypotheses.  Options allow you to include panel-specific means (fixed effects) and time trends in the model of the
    data-generating process.




二维码

扫码加我 拉你入群

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

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

全部回复
2013-6-4 21:22:08
谢谢分享啊!
二维码

扫码加我 拉你入群

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

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

2013-10-18 22:00:57
谢谢~~学习了。
二维码

扫码加我 拉你入群

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

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

2013-12-23 19:31:06
ssc install xtunitroot  报错r(601)
ssc install: "xtunitroot" not found at SSC, type -findit xtunitroot-
(To find all packages at SSC that start with x, type -ssc describe x-)

是什么情况呢?
二维码

扫码加我 拉你入群

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

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

2014-3-21 13:28:19
skydeeye 发表于 2013-12-23 19:31
ssc install xtunitroot  报错r(601)
ssc install: "xtunitroot" not found at SSC, type -findit xtuni ...
不能这么直接装,必须先findit xtunitroot,然后针对自己需要的模型安装
二维码

扫码加我 拉你入群

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

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

2014-3-31 13:57:03
正在学习,非常感谢
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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