Title

ffadf -- Flexible-Fourier ADF unit-root test with RALS and RALS2
(factor) augmentation for non-normal errors

Syntax

ffadf varname [if] [in] [, options]

The series must be tsset.

rals(#) 0 plain flexible-Fourier ADF (default), 1 RALS,
2 RALS with common/group factors

factors(varlist) common and group factors (required with rals(2))

det(#) deterministics: 1 constant, 2 constant + trend (default)

fmax(#) maximum Fourier frequency to search (default 4)

pmax(#) maximum augmentation lag (default 8)

ic(#) lag selection: 1=AIC, 2=BIC, 3=t-stat (default)

nsim(#) Monte-Carlo replications for the p-value (default 50000)

seed(#) random-number seed (default 2345)

Description

ffadf is the Dickey-Fuller counterpart of ffrals: an augmented
Dickey-Fuller test in which an unknown number of smooth breaks is approximated by
a single Fourier frequency (chosen by minimum residual sum of squares over
1..fmax). With rals(1) the regression is augmented by the
residual-augmented least-squares (RALS) moment terms for non-normal errors, and
with rals(2) by supplied common and group factors(). The statistic is
the t-ratio on the lagged level; the p-value and critical values are obtained
by Monte-Carlo simulation of the null distribution for the sample size at hand.

As for ffrals, the test statistic and rho-squared are exact and
match the source GAUSS routines to the last digit; the p-value and critical values
carry a small simulation error. ffadf is part of the
ffrals library.

Options

rals(#), factors(varlist): as in ffrals.

det(#): 1 demeans (constant only); 2 (default) allows a
linear trend.

fmax(#), pmax(#), ic(#), nsim(#), seed(#): as
in ffrals.

Examples

Plain flexible-Fourier ADF (trend):

. ffadf lgdp, rals(0) det(2)

RALS and factor-augmented versions:

. ffadf lgdp, rals(1)

. ffadf lgdp, rals(2) factors(fcommon fgroup)

Stored results

ffadf is rclass and stores r(stat), r(p),
r(freq), r(lag), r(rho2) (RALS), r(cv1), r(cv5),
r(cv10) and r(N). The test rejects for a statistic below the
critical value.

Author

Dr Merwan Roudane

merwanroudane920@gmail.com

github.com/merwanroudane

Faithful Stata port of the GAUSS Fourier_ADF/Fourier_ADF_RALS
routines by S. Nazlioglu; statistics validated byte-for-byte against the GAUSS
output.