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/