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

st: RE: RE: RE: RE: Reshape question (managing elapsed date)


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: RE: RE: Reshape question (managing elapsed date)
Date   Fri, 24 Oct 2003 19:14:54 +0100

Actually, the -tsset- would fail if 
start and end dates were in the same month. 

Nick 
[email protected] 

> -----Original Message-----
Nick Cox
> 
> expand 2
> bysort serial : replace bclmstdt = bclmeddt if _n == 2 
> gen mbclmstdt = month(bclmstdt) 
> tsset serial mbclmstdt 
> tsfill
> tab serial mbclmstdt 
> 
> That way you are assured exact months, although
> the tabulation ignores day within month. 
> 
> Note that you will get a display of 2 in the table
> if a person starts and ends within the same month. 

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