Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: From spell to person-month file


From   "A. Manzoni" <[email protected]>
To   <[email protected]>
Subject   RE: st: From spell to person-month file
Date   Wed, 29 Mar 2006 10:45:49 +0200

No, I have added to the spell file information related to the
characteristics of the job (I could add them only to the spell file, and not
directly to the person month), so now, in my spell file I have a variable
saying for example the sector in which someone was employed. 
I now want to go back to the person month file keeping also this info on the
sector, so I have for every month in which a spell was hold, the sector
variable. 

So illustrating>
The first original person month file was

Persnr   month   n_job
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

The spell file I have generated is

Persnr   n_job   beg   end
      1       1     1     3
      1       2     4     7
      1       3     8    10


Thenn I have added the sector variable, so it looks like
Persnr   n_job   beg   end	sect
      1       1     1     3	1
      1       2     4     7	3
      1       3     8    10	2

And now I want a person month likethis:


Persnr   month   n_job   sect
      1       1       1     1
      1       2       1     1
      1       3       1     1
      1       4       2     3
      1       5       2     3
      1       6       2     3
      1       7       2     3
      1       8       3     2
      1       9       3     2
      1      10       3     2


Thanks,
Anna



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