Dear Statalist,
I am trying to write an ado file to automate a series of commands, but I am
completely new to Stata programming so all I get is error messages. Hope you
can help.
Here is my routine:
local y="y"
local xlist="x1 x2"
reg `y' `xlist'
predict res, r
reg res l.res `xlist'
est table, keep(l.res) p
drop res
I would like to be able to have y, x1 , x2 etc. as user input, so that
myprog.ado would work with: myprog y x1 x2
Any suggestions?
Thanks in advance,
Robert Zimmerman
*
* 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/