Your variable list is in global macro S_E_vl
after -logistic-. Your response is in S_E_depv.
So here is one way to do it; there may be
better ones. Looking in e(b) is about as
much work as this.
After such a model, if you type
. covars
you will see a list and in addition
the list will be in local macro -covars-.
Here is -covars-
program covars
version 8.2
capture local covars : subinstr global S_E_vl "$S_E_depv" ""
if _rc {
di as err "no covariates known?"
exit 498
}
di as txt "`covars'"
c_local covars `covars'
end
Nick
[email protected]
Ricardo Ovaldia
> After an estimation command (logistic) are the
> covariate names saved in a macro? I know that I can
> get them from the -e(b)- matrix, but is there and
> easier way or code available?
*
* 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/