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

st: RE: Dates - collapsing variables for multiple records


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Dates - collapsing variables for multiple records
Date   Wed, 28 Jul 2004 11:44:02 +0100

I've spent a few minutes trying to read this, but it's 
too puzzling as printed given wrap-arounds and ambiguities 
on what the variable names are (e.g. are -username- and -ID- 
separate variables). 

Perhaps someone else can understand this. If not, 
you will need to re-post it. 

Incidentally, your first post on 22 July received
a reply on the same day. 

Nick 
[email protected] 

Hannah Moore BSc(Hons) wrote 
 
> What I was meaning in my previous email was I have data in this order:
> 
> username  ID  entrydate   exitdate  num_obs   date_obs1   
> date_obs2  date obs3
> 1                0      entry           exit                 
> 3              date1                 date2          date3
>   1                1      entry           exit                 
> 3              date1                 date2          date3
>   1                2      entry           exit                 
> 3              date1                 date2          date3
>   1                3     entry           exit                 
> 3              date1                 date2          date3
>    2                0     entry           exit                 
> 1               date1                   .                         .
>   2                1     entry           exit                 
> 1               date1                   .                         .
> 
>   And I would like data in this order:
> username    ID    entry     exit    num_obs
> 1                     0      entry     date1     3
>   1                     1     date1     date2     3
>   1                     2     date2    date3     3
>   1                     3    date3     exit          3
>   2                     0    entry       date1        1
>   2                     0    date1       exit        1
> 

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