Hi all,
I am having trouble with my MSc. Thesis. I have observations that look like this:
Basically, as it currently is, my data tells you what different jobs a person had and between what years. Therefore, A had 2 different jobs (1 and 2), 1 in years 2013-2015 and 2 in years 2013-2014. The problem is that I am not interested at all. I would like to have 1 observation per person, and I do not care about what different jobs/roles they had.
What I want to have is 1 observation per person, with the least recent year (for A this would be 2013), and one new variable that tells you the number of years that the person worked (i.e. the number of observations per PersonID). it would be like:
Do you think that is possible?
Thank you very much,
Carla
I am having trouble with my MSc. Thesis. I have observations that look like this:
PersonID | Role | Year |
A | 1 | 2013 |
A | 1 | 2014 |
A | 1 | 2015 |
A | 2 | 2013 |
A | 2 | 2014 |
B | 1 | 2014 |
B | 1 | 2015 |
What I want to have is 1 observation per person, with the least recent year (for A this would be 2013), and one new variable that tells you the number of years that the person worked (i.e. the number of observations per PersonID). it would be like:
ID | Year | Experience_years |
A | 2013 | 5 |
B | 2014 | 2 |
Do you think that is possible?
Thank you very much,
Carla
Comment