Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: on construction of variables in Stata


From   [email protected]
To   [email protected]
Subject   st: on construction of variables in Stata
Date   Mon, 28 Mar 2011 14:06:14 +0100 (BST)

Dear all,

I have a large data-set sorted by id and date over a period of three years (at 
the daily frequency). 


For each panel defined by id,  I need to build a variable that takes a value of 
one at a  specific date that is different for each id. Consequently, the 
variable (VAR) must take a  value of 1 till end of the sample period and it must 
take a value of zero at any date before this specific day. 


Currently, VAR has values of 1 only assigned to the specific days for each id 
and missing observations elsewhere. 


Could you please let me know if I could ask stata with some command to fill in 
VAR with zeros preceding these specific days and to fill it in with ones 
afterwards (ie after the occurrence of the specific date).

I would be very thankful!

Best,
Rado



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