Statalist The Stata Listserver


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

st: Date: Thu, 23 Mar 2006 17:04:46 +0100


From   "A. Manzoni" <[email protected]>
To   <[email protected]>
Subject   st: Date: Thu, 23 Mar 2006 17:04:46 +0100
Date   Thu, 23 Mar 2006 11:04:53 -0500 (EST)

Sorry, I post my question as attachment or I have seen there are problems in
reading it
From: A. Manzoni [[email protected]] on behalf of A. Manzoni
Sent: donderdag 23 maart 2006 17:00
To: [email protected]
Subject: Job spell sortid

I have a file with the variables persnr, month, empl(dummy var for employed/non employed), n_empl (indicating the order number of employment spells)
jobchange(indicating the month in which there is a job to job change, which is not recorded as employment spell, because an employment spell is defined when there is a non employment spell in between two jobs, so in case one go from a job to another job without going out of employment, I have only one employment spell, but I want to have 2 job spells)

I want to create a n_job variable (see below), indicating the order number of job spells. How can I do?



pid  month	empl  	n_empl	jobchange 	n_job
1	1	1	1		.	1
1	2	1	1		.	1
1	3	1	1		1	2
1	4	1	1		.	2
1	5	1	1		.	2
1	6	1	1		.	2
1	7	1	1		1	3
1	8	1	1		.	3	
1	9	1	1		.	3
1	10	1	1		1	4
1	11	1	1		.	4
1	12	0	.		.	.	
1	13	0	.		.	.
1	14	1	2		.	5
1	15	1	2		.	5
1	16	1	2		1	6
1	17	1	2		.	6	 


Thanks,
Anna



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index