我有一个面板数据(longitudinal data),也就是每个人(一个id)有多个工作(jobid从1到12不等),每个工作是一个观测值。工作之间有各种重合现象。
exp=前期工作经验+本期工作经验-重合部分。
求教怎样求每个工作的累积工作经验。
我有60点,出50点求答案,如果程序可行即付。
从来没有用过这样的方法,请告知付的程序。谢谢
这里是数据:
/* this is a forfeit data. it is about the activity of immigrants after landing.
I have variables such as hhldid, household id, jobid, js, which is the number of month
between an immigrant's landing time and his job start time. je, which is the number of month
between an immigrant's landing time and his job ending time.
you can find some ones have 2 jobs, some have 3. some one's jobs does not overlap. some do.
here is only a few examples of the overlapping situation. the real data is a little more
complicated, such as the some people hold 12 jobs since landing. and it nearly covers every
possible overlapping situation.
I wish I make the question clear. but if not, plz let me know and I will try my best to explain it.
please help and thanks for your time and kindness :)
*/
clear
input hhldid jobid js je
1 1 0.25 7.5
1 2 8 8.9
2 1 0.9 13.9
2 2 13.5 16.25
3 1 1 5
3 2 2 4.5
4 1 8.7 12
4 2 12.55 13.55
4 3 13.8 16.8
5 1 1.1 5.5
5 2 5 8
5 3 7 9
6 1 0.1 2
6 2 5.1 7.1
6 3 5 7
7 1 1.1 5.5
7 2 1.5 8
7 3 6 8
8 1 1 8
8 2 1.5 6
8 3 1.5 7
9 1 1 8
9 2 1.5 6
9 3 1.6 5
10 1 1 8
10 2 1.5 6
10 3 1.6 9
11 1 1 8
11 2 1.5 6
11 3 9 10
12 1 1 3
12 2 3.5 8
12 3 4 7
end
***************************
label var hhldid "household id"
label var jobid "job id for each job s/he worked or working since landing"
label var js "job start time, by quarter of a year"
label var je "job end time, by quarter of a year"
label var ts "training start time, by quarter of a year"
label var te "training end time, by quarter of a year"