Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: Dummy variable transformation replacing missing data


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Dummy variable transformation replacing missing data
Date   Mon, 11 Jun 2012 16:10:10 +0100

That's a very good FAQ but it's not quite what Joe is asking for. 

Joe wants something like this: 

egen x1 = max(x), by(id) 

except to that to be safe this should only be used if the result of 

egen xcount = count(x), by(id) 

is at most one. 

Nick 
n.j.cox@durham.ac.uk 

Ronnie Babigumira

This might be helpful

http://www.stata.com/support/faqs/data/missing.html 

On Monday, June 11, 2012 at 2:54 PM, Joe Dreyfus wrote:

 
> I have the following data.
> 
<snip>  
> 
> 
> The time period where the indicator is on is not relevant. I just need to know how to transform the variable so that if it is swtiched on in one time period it is transformed to be switched on for all time periods. 
> 

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index