Hi,
I have data on a group of applicants (applicationid) for a job, their previous jobs(onet), how long they spent in each of the previous jobs (length), and time between the last day of that job and the application date (elapsed=applicationdate- ndateto). I also got the O*NET characteristics of the previous jobs (char1, char2, and char3 are examples of those characteristics). I want to collapse data so that I have one row per person and have some weighted average of each O*NET characteristic for each person. In other words, I don't want to give equal weights to the previous jobs. I want to give a weight that is a function of time the applicant spent in the previous job (length) and how long has passed since they've been in the previous job (elapsed) in a way that sum of these weights for each person would be 1.
In this case, the jobs the applicants had a long time ago should get lower weights and the jobs in which the applicants had longer tenure should get higher weights. The sum of weights for previous jobs for each person should be 1.
I'm not sure what the best approach is. I really appreciate your help.
I have data on a group of applicants (applicationid) for a job, their previous jobs(onet), how long they spent in each of the previous jobs (length), and time between the last day of that job and the application date (elapsed=applicationdate- ndateto). I also got the O*NET characteristics of the previous jobs (char1, char2, and char3 are examples of those characteristics). I want to collapse data so that I have one row per person and have some weighted average of each O*NET characteristic for each person. In other words, I don't want to give equal weights to the previous jobs. I want to give a weight that is a function of time the applicant spent in the previous job (length) and how long has passed since they've been in the previous job (elapsed) in a way that sum of these weights for each person would be 1.
In this case, the jobs the applicants had a long time ago should get lower weights and the jobs in which the applicants had longer tenure should get higher weights. The sum of weights for previous jobs for each person should be 1.
I'm not sure what the best approach is. I really appreciate your help.
Code:
input long applicationid float(applicationdate ndatefrom ndateto length elapsed) str10 onet float(char1 char2 char3) 1 17265 14762 14823 61 2442 "39-1021.00" 4.05 3.94 3.89 1 17265 15127 15188 61 2077 "39-1021.00" 4.05 3.94 3.89 1 17265 15492 15553 61 1712 "39-1021.00" 4.05 3.94 3.89 1 17265 15584 17136 1552 129 "15-1151.00" 3.79 3.34 4.27 1 17265 15675 17136 1461 129 "33-9092.00" 3.33 2.61 3.18 1 17265 16223 16284 61 981 "11-9151.00" 4.46 3.85 4.1 1 17265 16588 16649 61 616 "11-9032.00" 4.15 4.01 4.46 1 17265 16953 17014 61 251 "11-9032.00" 4.15 4.01 4.46 1 17265 17014 17106 92 159 "25-2031.00" 3.97 4.07 4.25 1 17265 17106 17167 61 98 "25-2031.00" 3.97 4.07 4.25 1 17265 17226 17318 92 0 "25-2022.00" 4.34 4.37 4.47 2 19395 16315 17410 1095 1985 "25-9041.00" 4.04 3.92 3.62 2 19395 16680 16953 273 2442 "21-1011.00" 4.1 3.6 4.09 2 19395 17379 18049 670 1346 "21-1012.00" 4.19 3.96 3.91 2 19395 18171 18718 547 677 "41-2031.00" 3.95 3.69 3.6 2 19395 18871 19510 639 0 "25-2021.00" 4.12 4.15 3.78 3 17225 12631 13666 1035 3559 "25-9021.00" 4.35 4.06 4.15 3 17225 13727 14031 304 3194 "25-2032.00" 4.31 4.29 4.08 3 17225 14092 14762 670 2463 "25-2031.00" 3.97 4.07 4.25 3 17225 14823 15492 669 1733 "11-9032.00" 4.15 4.01 4.46 3 17225 15553 15857 304 1368 "27-3031.00" 3.88 3.79 3.92 3 17225 16010 16649 639 576 "35-1012.00" 3.58 3.13 3.2 3 17225 16680 16953 273 272 "25-9041.00" 4.04 3.92 3.62 end
Comment