楼主: newdragon
66416 37

[一般统计问题] [求助]求教STATA中面板数据单位根检验的做法 [推广有奖]

21
m8843620 发表于 2011-5-25 11:39:50
路過 學習一下

22
chengyh674 发表于 2011-8-6 08:31:30
help xtfrontier                              dialog:  xtfrontier               
                                           also see:  xtfrontier postestimation
-------------------------------------------------------------------------------

Title

    [XT] xtfrontier -- Stochastic frontier models for panel data


Syntax

    Time-invariant model

        xtfrontier depvar [indepvars] [if] [in] [weight] , ti [ti_options]


    Time-varying decay model

        xtfrontier depvar [indepvars] [if] [in] [weight] , tvd [tvd_options]


    ti_options                    description
    -------------------------------------------------------------------------
    Model
      noconstant                  suppress constant term
      ti                          use time-invariant model
      cost                        fit cost frontier model
      constraints(constraints)    apply specified linear constraints
      collinear                   keep collinear variables

    SE
      vce(vcetype)                vcetype may be oim, bootstrap, or jackknife

    Reporting
      level(#)                    set confidence level; default is level(95)

    Max options
      maximize_options            control the maximization process; seldom
                                    used
    -------------------------------------------------------------------------

    tvd_options                   description
    -------------------------------------------------------------------------
    Model
      noconstant                  suppress constant term
      tvd                         use time-varying decay model
      cost                        fit cost frontier model
      constraints(constraints)    apply specified linear constraints
      collinear                   keep collinear variables

    SE
      vce(vcetype)                vcetype may be oim, bootstrap, or jackknife

    Reporting
      level(#)                    set confidence level; default is level(95)

    Max options
      maximize_options            control the maximization process; seldom
                                    used
    -------------------------------------------------------------------------

    A panel variable must be specified. For xtfrontier, tvd, a time variable
      must also be specified. Use xtset.
    depvars and indepvars may contain time-series operators; see tsvarlist.
    by, statsby, and xi are allowed; see prefix.
    fweights and iweights are allowed; see weight.  Weights must be constant
      within panel.
    See [XT] xtfrontier postestimation for features available after
      estimation.


Description

    xtfrontier fits stochastic production or cost frontier models for panel
    data.  More precisely, xtfrontier estimates the parameters of a linear
    model with a disturbance generated by specific mixture distributions.

    The disturbance term in a stochastic frontier model is assumed to have
    two components.  One component is assumed to have a strictly nonnegative
    distribution, and the other component is assumed to have a symmetric
    distribution.  In the econometrics literature, the nonnegative component
    is often referred to as the inefficiency term, and the component with the
    symmetric distribution as the idiosyncratic error.  xtfrontier permits
    two different parameterizations of the inefficiency term:  a
    time-invariant model and the Battese-Coelli parameterization of
    time-effects.  In the time-invariant model, the inefficiency term assumed
    to have a truncated-normal distribution.  In the Battese-Coelli
    parameterization of time effects, the inefficiency term is modeled as a
    truncated-normal random variable multiplied by a specific function of
    time.  In both models, the idiosyncratic error term is assumed to have a
    normal distribution.  The only panel-specific effect is the random
    inefficiency term.


Options for time-invariant model

        +-------+
    ----+ Model +------------------------------------------------------------

    noconstant; see [XT] estimation options.

    ti specifies that the parameters of the time-invariant technical
        inefficiency model be estimated.

    cost specifies the frontier model be fitted in terms of a cost function
        instead of a production function.  By default, xtfrontier fits a
        production frontier model.

    constraints(constraints), collinear; see [XT] estimation options.

        +----+
    ----+ SE +---------------------------------------------------------------

    vce(vcetype) specifies the type of standard error reported, which
        includes types that are derived from asymptotic theory and that use
        bootstrap or jackknife methods; see [XT] vce_options.

        +-----------+
    ----+ Reporting +--------------------------------------------------------

    level(#); see [XT] estimation options.

        +-------------+
    ----+ Max options +------------------------------------------------------

    maximize_options: difficult, technique(algorithm_spec), iterate(#),
        [no]log, trace, gradient, showstep, hessian, shownrtolerance,
        tolerance(#), ltolerance(#), gtolerance(#), nrtolerance(#),
        nonrtolerance, from(init_specs); see [R] maximize.  These options are
        seldom used.


Options for time-varying decay model

        +-------+
    ----+ Model +------------------------------------------------------------

    noconstant; see [XT] estimation options.

    tvd specifies that the parameters of the time-varying decay model be
        estimated.

    cost specifies the frontier model be fitted in terms of a cost function
        instead of a production function.  By default, xtfrontier fits a
        production frontier model.

    constraints(constraints), collinear; see [XT] estimation options.

        +----+
    ----+ SE +---------------------------------------------------------------

    vce(vcetype) specifies the type of standard error reported, which
        includes types that are derived from asymptotic theory and that use
        bootstrap or jackknife methods; see [XT] vce_options.

        +-----------+
    ----+ Reporting +--------------------------------------------------------

    level(#); see [XT] estimation options.

        +-------------+
    ----+ Max options +------------------------------------------------------

    maximize_options: difficult, technique(algorithm_spec), iterate(#),
        [no]log, trace, gradient, showstep, hessian, shownrtolerance,
        tolerance(#), ltolerance(#), gtolerance(#), nrtolerance(#),
        nonrtolerance, from(init_specs); see [R] maximize.  These options are
        seldom used.


Examples

    Setup
        . webuse xtfrontier1

    Time-invariant model
        . xtfrontier lnwidgets lnmachines lnworkers, ti

    Time-varying decay model
        . xtfrontier lnwidgets lnmachines lnworkers, tvd

    Time-varying decay model with a constraint
        . constraint 1 [eta]_cons = 0
        . xtfrontier lnwidgets lnmachines lnworkers, tvd constraints(1)


Saved results

    xtfrontier saves the following in e():

    Scalars   
      e(N)           number of observations
      e(N_g)         number of groups
      e(k)           number of estimated parameters
      e(k_eq)        number of equations
      e(k_eq_model)  number of equations in model Wald test
      e(k_dv)        number of dependent variables
      e(df_m)        model degrees of freedom
      e(ll)          log likelihood
      e(rc)          return code
      e(chi2)        chi-squared
      e(converged)   1 if converged, 0 otherwise
      e(g_min)       minimum number of observations per group
      e(g_avg)       average number of observations per group
      e(g_max)       maximum number of observations per group
      e(sigma2)      sigma2
      e(gamma)       gamma
      e(Tcon)        1 if panels balanced; 0 otherwise
      e(sigma_u)     standard deviation of technical inefficiency
      e(sigma_v)     standard deviation of random error
      e(rank)        rank of e(V)
      e(p)           model significance
      e(ic)          number of iterations

    Macros   
      e(cmd)         xtfrontier
      e(cmdline)     command as typed
      e(depvar)      name of dependent variable
      e(title)       title in estimation output
      e(function)    production or cost
      e(model)       ti, after time-invariant model; tvd, after time-varying
                       decay model
      e(ivar)        variable denoting groups
      e(tvar)        variable denoting time
      e(wtype)       weight type
      e(wexp)        weight expression
      e(chi2type)    Wald; type of model chi-squared test
      e(vce)         vcetype specified in vce()
      e(vcetype)     title used to label Std. Err.
      e(opt)         type of optimization
      e(ml_method)   type of ml method
      e(user)        name of likelihood-evaluator program
      e(technique)   maximization technique
      e(crittype)    optimization criterion
      e(properties)  b V
      e(predict)     program used to implement predict

    Matrices  
      e(b)           coefficient vector
      e(ilog)        iteration log (up to 20 iterations)
      e(V)           variance-covariance matrix of the estimators

    Functions
      e(sample)      marks estimation sample


Also see

    Manual:  [XT] xtfrontier

    Online:  [XT] xtfrontier postestimation;
             [XT] xtset; [R] constraint, [R] frontie

23
chengyh674 发表于 2011-8-6 08:33:38

help xtunitroot dialog:  xtunitroot
-------------------------------------------------------------------------------

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.


Options

    LLC_options

    trend includes a linear time trend in the model that describes the
        process by which the series is generated.

    noconstant suppresses the panel-specific mean term in the model that
        describes the process by which the series is generated.  Specifying
        noconstant imposes the assumption that the series has a mean of zero
        for all panels.

    lags(lag_spec) specifies the lag structure to use for the ADF regressions
        performed in computing the test statistic.

        Specifying lags(#) requests that # lags of the series be used in the
        ADF regressions.  The default is lags(1).

        Specifying lags(aic #) requests that the number of lags of the series
        be chosen such that the Akaike information criterion (AIC) for the
        regression is minimized.  xtunitroot llc will fit ADF regressions
        with 1 to # lags and choose the regression for which the AIC is
        minimized.  This process is done for each panel so that different
        panels may use ADF regressions with different numbers of lags.

        Specifying lags(bic #) is just like specifying lags(aic #), except
        that the Bayesian information criterion (BIC) is used instead of the
        AIC.

        Specifying lags(hqic #) is just like specifying lags(aic #), except
        that the Hannan-Quinn information criterion is used instead of the
        AIC.

    kernel(kernel_spec) specifies the method used to estimate the long-run
        variance of each panel's series.  kernel_spec takes the form kernel
        maxlags.  kernel is one of bartlett, parzen, or quadraticspectral.
        maxlags is a number, nwest to request the Newey and West (1994)
        bandwidth selection algorithm, or llc to request the lag truncation
        selection algorithm in Levin, Lin, and Chu (2002).

        Specifying, for example, kernel(bartlett 3) requests the Bartlett
        kernel with 3 lags.

        Specifying kernel(bartlett nwest) requests the Bartlett kernel with
        the maximum number of lags determined by the Newey and West bandwidth
        selection algorithm.

        Specifying kernel(bartlett llc) requests the Bartlett kernel with the
        maximum number of lags determined by the method proposed in Levin,
        Lin, and Chu's (2002) article:

            maxlags = int(3.21*T^(1/3))

        where T is the number of observations per panel.  This is the
        default.

    demean requests that xtunitroot first subtract the cross-sectional
        averages from the series.  When specified, for each time period
        xtunitroot computes the mean of the series across panels and
        subtracts this mean from the series.  Levin, Lin, and Chu suggest
        this procedure to mitigate the impact of cross-sectional dependence.

    HT_options

    trend includes a linear time trend in the model that describes the
        process by which the series is generated.

    noconstant suppresses the panel-specific mean term in the model that
        describes the process by which the series is generated.  Specifying
        noconstant imposes the assumption that the series has a mean of zero
        for all panels.

    altt requests that xtunitroot use T-1 instead of T in the formulas for
        the mean and variance of the test statistic under the null
        hypothesis.  When the number of time periods, T, is small (less than
        10 or 15), the test suffers from severe size distortion when fixed
        effects or time trends are included; in these cases, using altt
        results in much improved size properties at the expense of
        significantly less power.

24
chengyh674 发表于 2011-8-6 08:34:23

    demean requests that xtunitroot first subtract the cross-sectional
        averages from the series.  When specified, for each time period
        xtunitroot computes the mean of the series across panels and
        subtracts this mean from the series.  Levin, Lin, and Chu suggest
        this procedure to mitigate the impact of cross-sectional dependence.

    Breitung_options

    trend includes a linear time trend in the model that describes the
        process by which the series is generated.

    noconstant suppresses the panel-specific mean term in the model that
        describes the process by which the series is generated.  Specifying
        noconstant imposes the assumption that the series has a mean of zero
        for all panels.

    lags(#) specifies the number of lags used to remove higher-order
        autoregressive components of the series.  The Breitung test assumes
        the data are generated by an AR(1) process; for higher-order
        processes, the first-differenced and lagged-level data are replaced
        by the residuals from regressions of those two series on the first #
        lags of the first-differenced data.  The default is to not perform
        this prewhitening step.

    robust requests a variant of the test that is robust to cross-sectional
        dependence.

    demean requests that xtunitroot first subtract the cross-sectional
        averages from the series.  When specified, for each time period
        xtunitroot computes the mean of the series across panels and
        subtracts this mean from the series.  Levin, Lin, and Chu suggest
        this procedure to mitigate the impact of cross-sectional dependence.

    IPS_options

    trend includes a linear time trend in the model that describes the
        process by which the series is generated.

    lags(lag_spec) specifies the lag structure to use for the ADF regressions
        performed in computing the test statistic.  With this option,
        xtunitroot reports Im, Pesaran, and Shin's (2003) W_t-bar statistic
        that is predicated on T going to infinity first, followed by N going
        to infinity.  By default, no lags are included, and xtunitroot
        instead reports Im, Pesaran, and Shin's t-tilde-bar and Z_t-tilde-bar
        statistics that assume T is fixed while N goes to infinity, as well
        as the t-bar statistic and exact critical values that assume both N
        and T are fixed.

        Specifying lags(#) requests that # lags of the series be used in the
        ADF regressions.  By default, no lags are included.

        Specifying lags(aic #) requests that the number of lags of the series
        be chosen such that the AIC for the regression is minimized.
        xtunitroot llc will fit ADF regressions with 1 to # lags and choose
        the regression for which the AIC is minimized.  This process is done
        for each panel so that different panels may use ADF regressions with
        different numbers of lags.

        Specifying lags(bic #) is just like specifying lags(aic #), except
        that the BIC is used instead of the AIC.

        Specifying lags(hqic #) is just like specifying lags(aic #), except
        that the Hannan-Quinn information criterion is used instead of the
        AIC.

        If you specify lags(0), then xtunitroot reports the W_t-bar statistic
        instead of the Z_t-bar, Z_tilde-t-bar, and t-bar statistics.

    demean requests that xtunitroot first subtract the cross-sectional
        averages from the series.  When specified, for each time period
        xtunitroot computes the mean of the series across panels and
        subtracts this mean from the series.  Levin, Lin, and Chu suggest
        this procedure to mitigate the impact of cross-sectional dependence.

    Fisher_options

    dfuller requests that xtunitroot conduct ADF unit-root tests on each
        panel by using the dfuller command.  You must specify either the
        dfuller or the pperron option.

    pperron requests that xtunitroot conduct Phillips-Perron unit-root tests
        on each panel by using the pperron command.  You must specify either
        the pperron or the dfuller option.

    lags(#) specifies the number of lags used to remove higher-order
        autoregressive components of the series.  The Fisher test assumes the
        data are generated by an AR(1) process; for higher-order processes,
        the first-differenced and lagged-level data are replaced by the
        residuals from regressions of those two series on the first # lags of
        the first-differenced data.  lags(#) is required.

    dfuller_opts are any options accepted by the dfuller command, including
        noconstant, trend, drift, and lags().  Because xtunitroot calls
        dfuller quietly, the dfuller option regress has no effect.

    pperron_opts are any options accepted by the pperron command, except
        regress, including noconstant, trend, and lags().  Because xtunitroot
        calls pperron quietly, the pperron option cmd:regress} has no effect.


    demean requests that xtunitroot first subtract the cross-sectional
        averages from the series.  When specified, for each time period
        xtunitroot computes the mean of the series across panels and
        subtracts this mean from the series.  Levin, Lin, and Chu suggest
        this procedure to mitigate the impact of cross-sectional dependence.

    Hadri_options

    trend includes a linear time trend in the model that describes the
        process by which the series is generated.

    robust requests a variant of the test statistic that is robust to
        heteroskedasticity across panels.

    kernel(kernel_spec) requests a variant of the test statistic that is
        robust to serially correlated errors.  kernel_spec specifies the
        method used to estimate the long-run variance of each panel's series.
        kernel_spec takes the form kernel [#].  Three kernels are supported:
        bartlett, parzen, and quadraticspectral.

        Specifying, for example, kernel(bartlett 3) requests the Bartlett
        kernel with 3 lags.

        If # is not specified, then 1 lag is used.

    demean requests that xtunitroot first subtract the cross-sectional
        averages from the series.  When specified, for each time period
        xtunitroot computes the mean of the series across panels and
        subtracts this mean from the series.  Levin, Lin, and Chu suggest
        this procedure to mitigate the impact of cross-sectional dependence.


Remarks

    xtunitroot implements a variety of tests for unit roots (or stationarity)
    in panel datasets.  Consider the autoregressive model

        y_it = a_it + rho_i * y_i,t-1 + e_it

   

25
chengyh674 发表于 2011-8-6 08:34:42
where e_it is a mean-zero regression error term and a_it represents the
    deterministic part of the model.  i=1, ..., N indexes panels, and t=1,
    ..., T indexes time.  a_it may include panel-specific intercepts (fixed
    effects), a panel-specific time trend, or nothing, in which case y_it is
    predicated to have mean zero for all panels.

    All the tests except for the Hadri LM test investigate null hypotheses of
    the general form Ho: rho_i = 1 versus Ha: rho_i < 1, though they differ
    in precisely how Ha is specified.  The Hadri LM test, rather than
    assuming a unit root under the null hypothesis, assumes that the data are
    stationary (rho_i < 1) versus the alternative that the data contain a
    unit root.

    Here we provide a brief overview of the salient features of each test;
    see [XT] xtunitroot for additional information.

    Remarks are presented under the following headings:

        Levin-Lin-Chu test
        Harris-Tzavalis test
        Breitung test
        Im-Pesaran-Shin test
        Fisher-type tests
        Hadri LM stationarity test


Levin-Lin-Chu test

    The Levin-Lin-Chu (LLC) (2002) test assumes that all panels have the same
    autoregressive parameter, i.e., that rho_i = rho for all i.  Then the
    alternative hypothesis is simply that rho < 1.

    The LLC test requires that the panels be strongly balanced.

    The LLC test is based on a regression t statistic, but because the data
    are nonstationary under the null hypothesis, the asymptotic mean and
    standard deviation of the t statistic depend on the specification of the
    deterministic part of the model.

    Levin, Lin, and Chu recommend using their procedure for moderate-sized
    panels, with perhaps between 10 and 250 individuals and 25 to 250
    observations per individual.  If the time-series dimension of the panel
    is very large, then standard unit-root tests can be applied to each
    panel, because the gains from aggregation are likely to be small.

    Formally, if there is no deterministic term in the model (a_it = 0), then
    the test allows the number of time periods, T, to tend to infinity at a
    slower rate than the number of cross-sectional units, N, though T must go
    to infinity sufficiently fast that sqrt(N)/T tends to 0.  If fixed
    effects or time trends are included in the deterministic part of the
    model, then T must tend to infinity at a rate faster than N so that N/T
    tends to 0.


Harris-Tzavalis test

    The Harris-Tzavalis (HT) (1999) test is similar to the LLC test in that
    it assumes that all panels have the same autoregressive parameter so that
    the alternative hypothesis is simply rho < 1.  Differing from the LLC
    test, the HT test assumes that the number of time periods, T, is fixed.

    Like the LLC test, the HT test requires that the panels be strongly
    balanced.

    Baltagi (2008, 278) mentions that T being fixed is the typical case in
    micropanel studies.  Here you may have a panel dataset of firms, and it
    may be more natural to think that if you could increase the sample size
    of your dataset, you would do so by collecting data on more firms, though
    the number of time periods available for each firm is fixed.


Breitung test

    The LLC and HT tests are based on regression t statistics that are
    subsequently adjusted to reflect the fact that under the null hypothesis,
    the t statistics have a nonzero mean because of the inclusion of
    panel-specific means or trends.  The Breitung (2000) test takes a
    different approach, transforming the data before computing the
    regressions so that the standard t statistics can be used.

    The Breitung test requires that the panels be strongly balanced.

    When the robust option is specified, a version of the t statistic that is
    robust to cross-sectional correlation of the error terms is reported.
    This statistic has an asymptotically normal distribution when first T
    tends to infinity followed by N tending to infinity.

    The Breitung test assumes that all panels have a common autoregressive
    parameter.  The null hypothesis is that all series contain a unit root.
    The alternative hypothesis is that rho < 1 so that the series are
    stationary.  Breitung and Das (2005) remark that the test also has power
    in the heterogeneous case, where each panel is allowed to have its own
    autoregressive parameter, though the test is optimal in the case where
    all panels have the same autoregressive parameter.

    The Breitung (2000) Monte Carlo simulations suggest that his test is
    substantially more powerful than other panel unit-root tests for the
    modest-size dataset he considered (N=20, T=30).


Im-Pesaran-Shin test

    A major limitation of the LLC, HT, and Breitung tests is the assumption
    that all panels have the same value of rho.  The Im-Pesaran-Shin (IPS)
    (2003) test relaxes the assumption of a common rho and instead allows
    each panel to have its own rho_i.  The null hypothesis is that all panels
    have a unit root (Ho: rho_i = 0 for all i).  The alternative hypothesis
    is that the fraction of panels that are stationary is nonzero.
    Specifically, if we let N_1 denote the number of stationary panels, then
    the fraction N_1/N tends to a nonzero fraction as N tends to infinity.
    This allows some (but not all) of the panels to possess unit roots under
    the alternative hypothesis.

    The IPS test does not require strongly balanced data, but there can be no
    gaps in each individual time series.

    When the errors are assumed to be serially uncorrelated, imposed by
    either specifying the lags(0) option or not specifying the lag() option
    at all, xtunitroot ips reports IPS's t-bar, t-tilde-bar, and
    Z_t-tilde-bar statistics.  These statistics assume that the number of
    time periods, T, is fixed.  When there are no gaps in the data,
    xtunitroot ips reports exact critical values for the t-bar statistic that
    are predicated on the number of panels, N, also being fixed.  The other
    two statistics assume N tends to infinity.

    For the asymptotic normal distribution of Z_t-tilde-bar to hold, T must
    be at least 5 if the dataset is strongly balanced and the deterministic
    part of the model includes only panel-specific means, or at least 6 if
    time trends are also included.  If the data are not strongly balanced,
    then T must be at least 9 for the asymptotic distribution to hold.  If
    these limits on T are not met, the p-value for Z_t-tilde-bar is not
    reported.

    When serial correlation in the error terms is accommodated by using the
    lags() option with xtunitroot ips, then IPS's W_t-bar statistic is
    reported.  This statistic is asymptotically normally distributed when
    first T tends to infinity followed by N tending to infinity.


Fisher-type tests

    Fisher-type tests approach testing for panel-data unit roots from a
    meta-analysis perspective.  That is, these tests conduct unit-root tests
    for each panel individually, and then combine the p-values from these
    tests to produce an overall test.  xtunitroot fisher supports ADF tests
    with the dfuller option and Phillips-Perron tests with the pperron
    option.  Any options allowed by dfuller or pperron can be specified
    (except the regress option has no effect).

    xtunitroot fisher does not require strongly balanced data, and the
    individual series can have gaps.

    These tests assume that T tends to infinity.  If the number of panels, N,
    is fixed, then these tests are consistent against the alternative that at
    least one panel is stationary.  If we allow N to tend to infinity, then
    the number of panels that do not have a unit root must grow at the same
    rate as N for the tests to be consistent.

   
已有 1 人评分学术水平 热心指数 收起 理由
bakezhima + 1 + 1 热心帮助其他会员

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

26
chengyh674 发表于 2011-8-6 08:34:48
xtunitroot fisher combines p-values using the inverse chi-squared,
    inverse normal, and inverse logit transformations.  Also a modified
    version of the inverse chi-squared transformation proposed by Choi (2001)
    is reported for use when N is believed to tend to infinity, because here
    the standard inverse chi-squared test statistic goes to infinity.


Hadri LM stationarity test

    All the tests discussed thus far have as the null hypothesis that the
    data contain a unit root.  As Hadri (2000) notes, classical hypothesis
    testing requires strong evidence to the contrary to reject the null
    hypothesis.  Thus we may also want to conduct a test in which the null
    and alternative hypotheses are reversed, to help confirm or deny
    conclusions based on tests with the null hypothesis being
    nonstationarity.

    The Hadri LM test requires that the panels be strongly balanced.

    The Hadri LM test has as the null hypothesis that all the panels are
    stationary, perhaps around a linear trend if the trend option is
    specified.  The alternative hypothesis is that at least some of the
    panels contain a unit root.  The test assumes that the model error terms
    are normally distributed.  The test is justified asymptotically as T
    tends to infinity followed by N tending to infinity.  Hadri states that
    his tests are appropriate for panel datasets in which T is large and N is
    moderate, such as the Penn World Tables frequently used for cross-country
    comparisons.


Examples

    Setup

        . webuse pennxrate

    LLC test, using the AIC to choose the number of lags for regressions and
    using an HAC variance estimator based on the Bartlett kernel and the
    number of lags chosen using Newey and West's method

        . xtunitroot llc lnrxrate if oecd, demean lags(aic 10)
            kernel(bartlett nwest)

    HT test, removing cross-sectional means from data

        . xtunitroot ht lnrxrate, demean

    Robust version of the Breitung test on a subset of OECD countries, using
    3 lags for the prewhitening step

        . xtunitroot breitung lnrxrate if g7, lags(3) robust

    IPS test, using the AIC to choose the number of lags for regressions

        . xtunitroot ips lnrxrate, lags(aic 5)

    Fisher-type test based on ADF tests with 3 lags, allowing for a drift
    term in each panel

        . xtunitroot fisher lnrxrate, dfuller lags(3) drift

    Hadri LM test of stationarity, using an HAC variance estimator based on
    the Parzen kernel with 5 lags

        . xtunitroot hadri lnrxrate, kernel(parzen 5)


Saved results

    xtunitroot llc saves the following in r():

    Scalars        
      r(N)                number of observations
      r(N_g)              number of groups
      r(N_t)              number of time periods
      r(sig_adj)          standard-deviation adjustment
      r(mu_adj)           mean adjustment
      r(delta)            pooled estimate of delta
      r(se_delta)         pooled standard error of delta
      r(Var_ep)           variance of whitened differenced series
      r(sbar)             mean of ratio of long-run to innovation standard
                            deviations
      r(ttilde)           observations per panel after lagging and
                            differencing
      r(td)               unadjusted t_delta statistic
      r(p_td)             p-value for t_delta
      r(tds)              adjusted t_delta_star statistic
      r(p_tds)            p-value for adjusted t_delta_star
      r(hac_lags)         lags used in HAC variance estimator
      r(hac_lagm)         average lags used in HAC variance estimator
      r(adf_lags)         lags used in ADF regressions
      r(adf_lagm)         average lags used in ADF regressions

    Macros         
      r(test)             llc
      r(hac_kernel)       kernel used in HAC variance estimator
      r(hac_method)       HAC lag-selection algorithm
      r(adf_method)       ADF regression lag-selection criterion
      r(demean)           demean, if the data were demeaned
      r(deterministics)   noconstant, constant, or trend


    xtunitroot ht saves the following in r():

    Scalars        
      r(N)                number of observations
      r(N_g)              number of groups
      r(N_t)              number of time periods
      r(rho)              estimated rho
      r(Var_rho)          variance of rho
      r(mean_rho)         mean of rho
      r(z)                z statistic
      r(p)                p-value

    Macros         
      r(test)             ht
      r(demean)           demean, if the data were demeaned
      r(deterministics)   noconstant, constant, or trend
      r(altt)             altt, if altt specified


    xtunitroot breitung saves the following in r():

    Scalars        
      r(N)                number of observations
      r(N_g)              number of groups
      r(N_t)              number of time periods
      r(lambda)           test statistic lambda
      r(lrobust)          robust test statistic lambda_R
      r(p)                p-value for lambda
      r(p_lrobust)        p-value for lambda_R
      r(lags)             lags used for prewhitening

    Macros         
      r(test)             breitung
      r(demean)           demean, if the data were demeaned
      r(robust)           robust, if specified
      r(deterministics)   noconstant, constant, or trend


    xtunitroot ips saves the following in r():

    Scalars        
      r(N)                number of observations
      r(N_g)              number of groups
      r(N_t)              number of time periods
      r(tbar)             test statistic t-bar
      r(cv_10)            exact 10% critical value for t-bar
      r(cv_5)             exact 5% critical value for t-bar
      r(cv_1)             exact 1% critical value for t-bar
      r(zt)               test statistic Z_t-bar
      r(ttildebar)        test statistic t-tilde-bar
      r(zttildebar)       test statistic Z_t-tilde-bar
      r(p_zttildebar)     p-value for Z_t-tilde-bar
      r(wtbar)            test statistic W_t-bar
      r(p_wtbar)          p-value for W_t-bar
      r(lags)             lags used in ADF regressions
      r(lagm)             average lags used in ADF regressions

    Macros         
      r(test)             ips
      r(demean)           demean, if the data were demeaned
      r(adf_method)       ADF regression lag-selection criterion
      r(deterministics)   constant or trend


    xtunitroot fisher saves the following in r():

    Scalars        
      r(N)                number of observations
      r(N_g)              number of groups
      r(N_t)              number of time periods
      r(P)                inverse chi-squared P statistic
      r(df_P)             P statistic degrees of freedom
      r(p_P)              p-value for P statistic
      r(L)                inverse logit L statistic
      r(df_L)             L statistic degrees of freedom
      r(p_L)              p-value for L statistic
      r(Z)                inverse normal Z statistic
      r(p_Z)              p-value for Z statistic
      r(Pm)               modified inverse chi-squared P_m statistic
      r(p_Pm)             p-value for P_m statistic

    Macros         
      r(test)             fisher
      r(urtest)           dfuller or pperron
      r(options)          options passed to dfuller or pperron
      r(demean)           demean, if the data were demeaned


    xtunitroot hadri saves the following in r():

    Scalars        
      r(N)                number of observations
      r(N_g)              number of groups
      r(N_t)              number of time periods
      r(var)              variance of z under Ho
      r(mu)               mean of z under Ho
      r(z)                test statistic z
      r(p)                p-value for z
      r(lags)             lags used for HAC variance

    Macros         
      r(test)             hadri
      r(demean)           demean, if the data were demeaned
      r(robust)           robust, if specified
      r(kernel)           kernel used for HAC variance
      r(deterministics)   constant or trend


References

    Baltagi, B. H. 2008.  Econometric Analysis of Panel Data. 4th ed.  New
        York: Wiley.

    Breitung, J. 2000.  The local power of some unit root tests for panel
        data.  In Advances in Econometrics, Volume 15:  Nonstationary Panels,
        Panel Cointegration, and Dynamic Panels, ed. B. H. Baltagi, 161-178.
        Amsterdam: JAI Press.

    Breitung, J., and S. Das. 2005.  Panel unit root tests under
        cross-sectional dependence.  Statistica Neerlandica 59: 414-433.

    Choi, I. 2001.  Unit root tests for panel data.  Journal of International
        Money and Finance 20: 249-272.

    Hadri, K. 2000.  Testing for stationarity in heterogeneous panel data.
        Econometrics Journal 3: 148-161.

    Harris, R. D. F., and E. Tzavalis. 1999.  Inference for unit roots in
        dynamic panels where the time dimension is fixed.  Journal of
        Econometrics 91: 201-226.

    Im, K. S., M. H. Pesaran, and Y. Shin. 2003.  Testing for unit roots in
        heterogeneous panels.  Journal of Econometrics 115: 53-74.

    Levin, A., C.-F. Lin, and C.-S. J. Chu. 2002.  Unit root tests in panel
        data: Asymptotic and finite-sample properties.  Journal of
        Econometrics 108: 1-24.

    Newey, W. K., and K. D. West. 1994.  Automatic lag selection in
        covariance matrix estimation.  Review of Economic Studies 61:
        631-653.


Also see

    Manual:  [XT] xtunitroot

      Help:  [TS] dfuller, [TS] pperron

27
ustcer 发表于 2012-4-16 16:39:04
首先要声明时间序列,输入以下命令:
gen t=_n
tsset t
然后可以选择一种单位根检验,如选择Dickey-Fuller检验,则输入:
dfuller 变量名
我的人生,不解释:刻苦、坚忍、豁达

28
haoxiuqin 发表于 2012-7-15 10:33:33
学习了

29
mousegxl 发表于 2012-7-17 10:35:40
我怎么找不到要下载的命令。

30
bakezhima 在职认证  发表于 2012-9-14 10:24:39
大概懂了一点点,但离上手还有一定距离~

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-2-21 11:36