Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Accessing post-estimation variable names


From   "Jan Teorell" <[email protected]>
To   [email protected]
Subject   st: Accessing post-estimation variable names
Date   Wed, 8 Dec 2004 19:09:51 +0100

Hi statalist users, I hope this one is as easy to answer as my last 
one was.

I am writing a program for a post-estimation command where I need 
to access the names of all the variables (not only the dependent 
one) that were used by the previous estimation command. For 
example, after regr y x z w, I want access to the string "y x z w" in 
my own command (long), parse this string and make a number of 
transformations on each of its variables. Anyone knows how to 
access the string? (I thought mat b = e(b), local cn: colnames `b' 
would to it, but cn contains strange series of numbers, no variables 
names; apparently, the macro extended function colnames only 
works in order to name the columns of other matrices with mat 
colnames.)

All the best,

Jan
*
*   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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index