Statalist


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

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


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
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

into

local i `lags'

See -help syntax- for more info.

Michael Blasnik

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

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.

<snip>
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
<snip>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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