{smcl}
{* *! version 1.1.3  11feb2011}{...}
{viewerdialog dfuller "dialog dfuller"}{...}
{vieweralsosee "[TS] dfuller" "mansection TS dfuller"}{...}
{vieweralsosee "" "--"}{...}
{vieweralsosee "[TS] dfgls" "help dfgls"}{...}
{vieweralsosee "[TS] pperron" "help pperron"}{...}
{vieweralsosee "[TS] tsset" "help tsset"}{...}
{vieweralsosee "[XT] xtunitroot" "help xtunitroot"}{...}
{viewerjumpto "Syntax" "dfuller##syntax"}{...}
{viewerjumpto "Description" "dfuller##description"}{...}
{viewerjumpto "Options" "dfuller##options"}{...}
{viewerjumpto "Examples" "dfuller##examples"}{...}
{viewerjumpto "Saved results" "dfuller##saved_results"}{...}
{title:Title}

{p2colset 5 21 23 2}{...}
{p2col:{manlink TS dfuller} {hline 2}}Augmented Dickey-Fuller unit-root test{p_end}
{p2colreset}{...}


{marker syntax}{...}
{title:Syntax}

{p 8 16 2}
{cmd:dfuller}
{varname}
{ifin}
[{cmd:,} {it:options}]

{synoptset 14 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Main}
{synopt:{opt nocon:stant}}suppress constant term in regression{p_end}
{synopt:{opt tr:end}}include trend term in regression{p_end}
{synopt:{opt dr:ift}}include drift term in regression{p_end}
{synopt:{opt reg:ress}}display regression table{p_end}
{synopt:{opt l:ags(#)}}include {it:#} lagged differences{p_end}
{synoptline}
{p2colreset}{...}
{p 4 6 2}
You must {opt tsset} your data before using {opt dfuller}; see
{manhelp tsset TS}.
{p_end}
{p 4 6 2}
{it:varname} may contain time-series operators; see {help tsvarlist}.
{p_end}


{title:Menu}

{phang}
{bf:Statistics > Time series > Tests > Augmented Dickey-Fuller unit-root test}


{marker description}{...}
{title:Description}

{pstd}
{opt dfuller} performs the augmented Dickey-Fuller test 
that a variable follows a unit-root process.  
The null hypothesis is that the variable contains a unit root, and the
alternative is that the variable was generated by a stationary process.
You may optionally exclude the constant, include a trend term, and include
lagged values of the difference of the variable in the regression.


{marker options}{...}
{title:Options}

{dlgtab:Main}

{phang}
{opt noconstant} suppresses the constant term (intercept) in the
   model and indicates that the process under the null hypothesis is a random
   walk without drift.  {opt noconstant} cannot be used with the {opt trend}
   or {opt drift} option.

{phang}
{opt trend} specifies that a trend term be included in the associated
   regression and that the process under the null hypothesis is a random walk,
   perhaps with drift.  This option may not be used with the {opt noconstant}
   or {opt drift} option.

{phang}
{opt drift} indicates that the process under the null hypothesis is a random
   walk with nonzero drift.  This option may not be used with the
   {opt noconstant} or {opt trend} option.

{phang}
{opt regress} specifies that the associated regression table appear in the
   output.  By default, the regression table is not produced.

{phang}
{opt lags(#)} specifies the number of lagged difference terms to include in
   the covariate list.


{marker examples}{...}
{title:Examples}

{pstd}Setup{p_end}
{phang2}{cmd:. webuse air2}

{pstd}Test whether {cmd:air} follows a unit-root process{p_end}
{phang2}{cmd:. dfuller air}

{pstd}Same as above, but include 3 lagged differences and a trend term{p_end}
{phang2}{cmd:. dfuller air, lags(3) trend}

{pstd}Same as above, but also display the regression table{p_end}
{phang2}{cmd:. dfuller air, lags(3) trend regress}


{marker saved_results}{...}
{title:Saved results}

{pstd}
{cmd:dfuller} saves the following in {cmd:r()}:

{synoptset 15 tabbed}{...}
{p2col 5 15 19 2: Scalars}{p_end}
{synopt:{cmd:r(N)}}number of observations{p_end}
{synopt:{cmd:r(lags)}}number of lagged differences{p_end}
{synopt:{cmd:r(Zt)}}Dickey-Fuller test statistic{p_end}
{synopt:{cmd:r(p)}}MacKinnon approximate p-value (if there is a constant or
trend in associated regression){p_end}
{p2colreset}{...}
