You can do something like this after an estimation command:
di "nvars=" e(df_m)
which is actually printing out the degrees of freedom (doesn't include the
constant in OLS)
You can also do the following:
matrix slopes=e(b)
local nvars=colsof(slopes)
di "nvars=`nvars'"
The number of variables will include the constant (for OLS).
The following will give you the variables that are accessible after an
estimation command:
ereturn list
- Paul Millar
Sociology
University of Calgary
At 03:33 PM 18/03/2005, you wrote:
Hi to all,
Could anyone tell me the built-in variable for the number of
regressors in Stata? Thanks!
Luhang
*
* 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/
*
* 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/