Dear Statalist:
I would like to construct an experience variable for the PSID data, for every year, for each Head of the Household. For the moment, I am not using the data longitudinally. Just cross sectionally.
Starting in 2003, the PSID runs the survey every other yer. So, for the in-between years, it asks questions about the beginning and end date and month for each job the Head has had, up to four jobs. It also asks for the occupational category the job is in. So for the most recent job, call it job 1, I wrote the following basic (I am not a Stata expert, I just have a a rudimentary knowledge of the basic commands) :
Example
gen mngm1=0
replace mngm1=1 if ER21145>=1 & ER21145 <=43
gen bus1=0
replace bus1=1 if ER21145>=50 & ER21145 <=73
....and so on...
to create the dummy variables for every US CENSUS occupational category,
Then, I created a new "tenure" variable by calculating the difference in the years of tenure at job 1, in each occupational category:
generate ten1mngm1= yendjob1- ystartjob1 if mngm1==1
generate ten1bus1= yendjob1- ystartjob1 if bus1==1
... and so on...
This is probably not a good way of doing this, so I wonder if there is a more efficient way of proceeding.
Also, I am afraid I do not know how to tell state to calculate the difference in in the months of employment in job 1, so that I can get an accurate tenure variable. So, the PSID tells me the start month and the end month (as well as the years, of course!) for each job the person has had. But I do not know how to construct a new variable that calculates that difference in the months.
Since I want to calculate this experience variable for every year in the PSID, I wonder if someone can help.
Thank you for all the assistance you can provide on this! Elena Quercioli
I would like to construct an experience variable for the PSID data, for every year, for each Head of the Household. For the moment, I am not using the data longitudinally. Just cross sectionally.
Starting in 2003, the PSID runs the survey every other yer. So, for the in-between years, it asks questions about the beginning and end date and month for each job the Head has had, up to four jobs. It also asks for the occupational category the job is in. So for the most recent job, call it job 1, I wrote the following basic (I am not a Stata expert, I just have a a rudimentary knowledge of the basic commands) :
Example
gen mngm1=0
replace mngm1=1 if ER21145>=1 & ER21145 <=43
gen bus1=0
replace bus1=1 if ER21145>=50 & ER21145 <=73
....and so on...
to create the dummy variables for every US CENSUS occupational category,
Then, I created a new "tenure" variable by calculating the difference in the years of tenure at job 1, in each occupational category:
generate ten1mngm1= yendjob1- ystartjob1 if mngm1==1
generate ten1bus1= yendjob1- ystartjob1 if bus1==1
... and so on...
This is probably not a good way of doing this, so I wonder if there is a more efficient way of proceeding.
Also, I am afraid I do not know how to tell state to calculate the difference in in the months of employment in job 1, so that I can get an accurate tenure variable. So, the PSID tells me the start month and the end month (as well as the years, of course!) for each job the person has had. But I do not know how to construct a new variable that calculates that difference in the months.
Since I want to calculate this experience variable for every year in the PSID, I wonder if someone can help.
Thank you for all the assistance you can provide on this! Elena Quercioli
Comment