I'm trying to create a local variable that creates a new local with
more variables, hard to explain but easier to see the code:
eststo clear
local r "a b c d e f"
local t=0
foreach x of local r {
stcox "`r'"
eststo e`t'
local t=`t'+1
}
eststo u: appendmodels e0 e1 e2 e3 e4 e5
esttab u
But what I want to do is to create a new local var that can take any
number of variables in r and automatically create a local g that can
be used in the appendmodels command, eg
eststo clear
local r "a b c d e f g h..."
local t=0
foreach x of local r {
stcox "`r'"
eststo e`t'
local t=`t'+1
//generate some kind of appended local here (q), that I cannot figure out//
}
eststo u: appendmodels `q'
esttab u
The thing is that appendmodels doesnt allow e0-e8 notation.
Regards
moleps
*
* 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/