Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Lag testing issue


From   Ben Ullman <[email protected]>
To   [email protected]
Subject   st: Lag testing issue
Date   Sun, 12 Apr 2009 22:41:52 -0400

Hi,

I am trying to run a VAR lag selection, then an ADF test and a 
regression followed by a chow test on a dataset in a do loop.  The loop 
works by storing the selected SBIC lag value from the varsoc command as 
a local macro and then using that local macro as my maxlag in the ADF 
test as well as the regression. 

The do loop works until it gets to the test after the regression.  The 
regression works as follows:

reg x l(1/`localmacro').x l(1/`localmacro').x_lag dummyvariable
test dummyvariable l(1/`localmacro').x_lag

The output is "function l" not recognized.  For some reason the lag 
operator works in all functions, except for in the test.

Is there a simple way around this issue? 

Thanks,
Ben

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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