[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Program ADF test with Perron's procedure

From   "Michael Blasnik" <>
To   <>
Subject   st: Re: Program ADF test with Perron's procedure
Date   Wed, 03 Oct 2007 09:46:47 -0400


I see one immediate mistake -- you refer to the local macro lags as if it is a scalar or variable named Lags

You need to change:

local i Lags


local i `lags'

See -help syntax- for more info.

Michael Blasnik

----- Original Message ----- From: "Myriam Nourry" <>
To: <>
Sent: Wednesday, October 03, 2007 9:03 AM
Subject: st: Program ADF test with Perron's procedure

I am trying to write a program to test unit root (ADF
test) by using Perron's procedure to choose the
maximum lag length included in the regression.

Therefore, I wrote the following program (this is my
first program...) but it doesn't work and I can't see
the errors. So I need your help !

capture program drop adfperron
*! adfperron v1 Nourry 03oct2007
program define adfperron, rclass
version 9.2
syntax varname(ts) [if] [in] [,Lags(int -1)]
marksample touse

local i Lags
* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index