Print

Print


Dear Ox Users,

Please find a beginner's question below.

Recently I wrote an ox code to estimate an ADF equation for three variables. But I have to write the same code three times for each of the variables; only changing the name of the variable in each code.

Then I wondered if I could write on program to estimate the ADF equation for all the three variables, for efficiency. This landed me in a difficult territory.
First, I wrote a program to open the three variables, with their respective names and values (see attached file called asNamesFile1). However, I cannot proceed to run the ADF equation for each variable after reading them.
Second, I wrote a program to read the data using #import <database>. In the program I read the each variable, then select dependent variable and regressors for each, and then call the regression function. The problem is that the regression function estimates the ADF equation 9 times instead of 3 times (see attached file called asNamesFile2).

Can someone please assist.

Thanks,
Lexi