Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: label


From   Richard Goldstein <[email protected]>
To   [email protected]
Subject   Re: st: Re: label
Date   Thu, 25 Sep 2008 14:51:38 -0400

for simple gen (replace) statements there is an easier way: the user-written command -defv- (use -findit-); note, however, that -defv- does not work with -egen- or with -by-

Rich

Christopher Baum wrote:

Not to my knowledge.
Probably the best way of documenting this is to use variable -notes-. Try this:

program mygen
qui gen `0'
gettoken name rest: 0
note `name': `0'
end

mygen lprice = log(price)
mygen gpm = 1/mpg
notes

Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html

On Sep 25, 2008, at 1:47 PM, Alessandro Oliveira wrote:


Dear Chris,

Hi, I wonder if you could help me with an Stata issue.
Is it possible for stata to automatically label a new variable with the formula used in "gen"? ex: gen y = x+1 automatically yielding label variable y with "gen y = x+1"
Kind regards,
Alessandro.
*
*   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/



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