Command Reference : Command Reference
  
 
uroot
Carries out unit root tests on a single series, pool series, group of series, or panel structured series.
The ordinary, single series unit root tests include Augmented Dickey-Fuller (ADF), GLS detrended Dickey-Fuller (DFGLS), Phillips-Perron (PP), Kwiatkowski, et. al. (KPSS), Elliot, Rothenberg, and Stock (ERS) Point Optimal, or Ng and Perron (NP) tests for a unit root in the series (or its first or second difference).
If used on a series in a panel structured workfile, or with a pool series, or group of series, the procedure will perform panel unit root testing. The panel unit root tests include Levin, Lin and Chu (LLC), Breitung, Im, Pesaran, and Shin (IPS), Fisher - ADF, Fisher - PP, and Hadri tests on levels, or first or second differences.
Syntax
uroot(options) object_name
where object_name can be the name of a series, group or pool object.
Options
Basic Specification Options
You should specify the exogenous variables and order of dependent variable differencing in the test equation using the following options:
 
const (default)
Include a constant in the test equation.
trend
Include a constant and a linear time trend in the test equation.
none
Do not include a constant or time trend (only available for the ADF and PP tests).
dif=integer (default=0)
Order of differencing of the series prior to running the test. Valid values are {0, 1, 2}.
For backward compatibility, the shortened forms of these options, “c”, “t”, and “n”, are presently supported. For future compatibility we recommend that you use the longer forms.
For ordinary (non-panel) unit root tests, you should specify the test type using one of the following keywords:
 
adf (default)
Augmented Dickey-Fuller.
dfgls
GLS detrended Dickey-Fuller (Elliot, Rothenberg, and Stock).
pp
Phillips-Perron.
kpss
Kwiatkowski, Phillips, Schmidt, and Shin.
ers
Elliot, Rothenberg, and Stock (Point Optimal).
np
Ng and Perron.
For panel testing, you may use one of the following keywords to specify the test:
 
sum (default)
Summary of all of the panel unit root tests.
llc
Levin, Lin, and Chu.
breit
Breitung.
ips
Im, Pesaran, and Shin.
adf
Fisher - ADF.
pp
Fisher - PP.
hadri
Hadri.
Options for ordinary (non-panel) unit root tests
In addition, the following panel specific options are available:
 
hac=arg
Method of estimating the frequency zero spectrum: “bt” (Bartlett kernel), “pr” (Parzen kernel), “qs” (Quadratic Spectral kernel), “ar” (AR spectral), “ardt (AR spectral - OLS detrended data), “argls” (AR spectral - GLS detrended data).
Applicable to PP, KPSS, ERS, and NP tests. The default settings are test specific (“bt” for PP and KPSS, “ar” for ERS, “argls” for NP).
band = arg, b=arg (default=“nw”)
Method of selecting the bandwidth: “nw” (Newey-West automatic variable bandwidth selection), “a” (Andrews automatic selection), number (user specified bandwidth).
Applicable to PP, KPSS, ERS, and NP tests when using kernel sums-of-covariances estimators (where “hac=” is one of {bt, pz, qs}).
lag=arg (default=“a”)
Method of selecting lag length (number of first difference terms) to be included in the regression: “a” (automatic information criterion based selection), or integer (user-specified lag length).
Applicable to ADF and DFGLS tests, and for the other tests when using AR spectral density estimators (where “hac=” is one of {ar, ardt, argls}).
infosel=arg (default=“sic”)
Information criterion to use when computing automatic lag length selection: “aic” (Akaike), “sic” (Schwarz), “hqc” (Hannan-Quinn), “msaic” (Modified Akaike), “msic” (Modified Schwarz), “mhqc” (Modified Hannan-Quinn).
Applicable to ADF and DFGLS tests, and for other tests when using AR spectral density estimators (where “hac=” is one of {ar, ardt, argls}).
maxlag=integer
Maximum lag length to consider when performing automatic lag length selection:
default=
Applicable to ADF and DFGLS tests, and for other tests when using AR spectral density estimators (where “hac=” is one of {ar, ardt, argls}).
Options for panel unit root tests
The following panel specific options are available:
 
balance
Use balanced (across cross-sections or series) data when performing test.
hac=arg (default=“bt”)
Method of estimating the frequency zero spectrum: “bt” (Bartlett kernel), “pr” (Parzen kernel), “qs” (Quadratic Spectral kernel).
Applicable to “Summary”, LLC, Fisher-PP, and Hadri tests.
band = arg, b=arg (default=“nw”)
Method of selecting the bandwidth: “nw” (Newey-West automatic variable bandwidth selection), “a” (Andrews automatic selection), number (user-specified common bandwidth), vector_name (user-specified individual bandwidth).
Applicable to “Summary”, LLC, Fisher-PP, and Hadri tests.
lag=arg
Method of selecting lag length (number of first difference terms) to be included in the regression: “a” (automatic information criterion based selection), integer (user-specified common lag length), vector_name (user-specific individual lag length).
If the “balance” option is used,
default=
where is the length of the shortest cross-section or series, otherwise default=“a”.
Applicable to “Summary”, LLC, Breitung, IPS, and Fisher-ADF tests.
infosel=arg (default=“sic”)
Information criterion to use when computing automatic lag length selection: “aic” (Akaike), “sic” (Schwarz), “hqc” (Hannan-Quinn).
Applicable to “Summary”, LLC, Breitung, IPS, and Fisher-ADF tests.
maxlag=arg
Maximum lag length to consider when performing automatic lag length selection, where arg is an integer (common maximum lag length) or a vector_name (individual maximum lag length)
default=
where is the length of the cross-section or series.
Other options
 
prompt
Force the dialog to appear from within a program.
p
Print output from the test.
Examples
The command:
uroot(adf,const,lag=3,save=mout) gdp
performs an ADF test on the series GDP with the test equation including a constant term and three lagged first-difference terms. Intermediate results are stored in the matrix MOUT.
uroot(dfgls,trend,infosel=sic) ip
runs the DFGLS unit root test on the series IP with a constant and a trend. The number of lagged difference terms is selected automatically using the Schwarz criterion.
uroot(kpss,const,hac=pr,b=2.3) unemp
runs the KPSS test on the series UNEMP. The null hypothesis is that the series is stationary around a constant mean. The frequency zero spectrum is estimated using kernel methods (with a Parzen kernel), and a bandwidth of 2.3.
uroot(np,hac=ardt,infosel=maic) sp500
runs the NP test on the series SP500. The frequency zero spectrum is estimated using the OLS AR spectral estimator with the lag length automatically selected using the modified AIC.
Cross-references
See “Unit Root Testing” for discussion of standard unit root tests performed on a single series, and “Panel Unit Root Testing” for discussion of unit roots tests performed on panel structured workfiles, groups of series, or pooled data.