I simply want to go back to the original person month file, the one from
which I have generated the spell file, so I want the initial one back.
(Sure, actually I have saved the original one. But then I made some addition
in the spell file, so I want to go back to the original person month taking
with me also the variable I have added in the spell file, but the basic
structure is exactly the same.)
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Ronnie Babigumira
Sent: woensdag 29 maart 2006 09:18
To: [email protected]
Subject: Re: st: From spell to person-month file
Not sure I follow. How would you like you final file to look like (you have
illustrated the "person month file" and the
"spell file", could you do the same for the "new person month file" you are
trying to create)
A. Manzoni wrote:
> My question attached in a .txt file
>
> Anna
>
>
> ------------------------------------------------------------------------
>
>
> I had a person month file like
>
> Persnr month n_job(this indicates the order number of the spell)
> 1 1 1
> 1 2 1
> 1 3 1
> 1 4 2
> 1 5 2
> 1 6 2
> 1 7 2
> 1 8 3
> 1 9 3
> 1 10 3
>
>>From this I have created a spell file like this
>
> Persnr beg end n_job
> 1 1 3 1
> 1 4 7 2
> 1 8 10 3
>
>
> using -collapse-:
>
> collapse (min) beg=month (max) end=month , by(Persnr n_job)
>
>
>
> Now I would like to go back to the person month file. How could I do
(considering that I have also additional info related to the job spell,e.g
sector, isco code etc..- and I also have missing n_job, when there
respondent was not employed in some months)?
> Usually I use the expand function, after generating the number of month
each spells lasts, but this causes some difficulties when in one month there
is more than one spell, so the same month is there more than once.
> Is there a better way to go back from the spell file (the 2nd I have
described)to the person month dataset (the first one I have shown here)?
>
>
>
*
* 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/
*
* 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/