RATS 10.1
RATS 10.1

@HADRI implements the LM tests for unit roots in panel data from Hadri(2000). This has stationarity as the null, and rejects (in favor of some unit roots) if the detrended or de-meaned data are too persistent. It is, in effect, an aggregation of KPSS test statistics, using large N asymptotics applied to the average of the KPSS statistics. Alternative tests for unit roots in panel data are @Breitung, @LevinLin and @IPShin.

@HADRI( options )   series start end

Parameters

series

series to analyze

start, end

range of series to use. By default, the defined range of series.

Options

DET=NONE/[CONSTANT]/TREND

Individual-specific deterministic components to remove. Note NONE is an error and is provided simply to keep the form of the option similar to related procedures.
 

SMPL=standard SMPL option[not used]

 

VARIANCE=[HOMOGENEOUS]/HETEROGENEOUS/ROBUST

LWINDOW=NEWEY/BARTLETT/FLAT/PARZEN/QUADRATIC

LAGS=# of lags for the lag window (or bandwidth for LWINDOW=QUADRATIC) [Schwert's]

If VARIANCE=HOMOGENEOUS, the variances are assumed to be the same in each cross section. HETEROGENEOUS is for no serial correlation, but differing variances. ROBUST allows for heterogeneous serial correlation, with the long-run variance computed according to the LWINDOW and LAGS options.

 

TITLE="title for output" ["Hadri Unit Root Test: Series ..."]

[PRINT]/NOPRINT

Variables Defined

%CDSTAT

the Hadri test statistic  (REAL)

%SIGNIF

the significance level of %CDSTAT as a one-tailed N(0,1)  (REAL)

%NGROUP

number of individuals (INTEGER)

Example

This does the Hadri test on the real exchange rate from OECD data. The data have had time effects removed. The calculation uses HAC covariance estimates for the variance with a Bartlett (Newey-West) window of width 5.

 

open data pennxrate.dta

calendar(panelobs=34,a) 1970

data(format=dta) 1//1970:01 151//2003:01 year xrate ppp id capt realxrate lnrxrate oecd g7

panel(entry=1.0,time=-1.0,smpl=oecd) lnrxrate / cxrate

@hadri(smpl=oecd,det=constant,var=robust,lwindow=bartlett,lags=5) cxrate

Sample Output

This is the output from the example. This rejects stationarity in favor of at least some unit roots.

 

Hadri LM Unit Root Test: Series CXRATE

Test has large N, large T asymptotics

Null is Stationary. Alternative is Some Unit Roots

Individual Specific Components: Constant

Robust to Serial Correlation, Bartlett(Newey-West)(5)

 

N            27

T            34

Z      8.835604

Signif 0.000000


 


Copyright © 2025 Thomas A. Doan