Dear Statalist,
I have a dataset that with data on around 2,000 individuals and their employment histories. These histories cover a varying length of time upto about 50 years. The data are currently in a form {name, title, job1_location, job1_startdate job1_enddate, job1_type, job1_notes, job2_location, ..., job15_location, job15_startdate job15_enddate, job15_type, job15_notes, otherrole1_name, otherrole1_startdate, otherrole1_enddate, otherrole2_name, ..., boardposition1_name, boardposition1_startdate1,..., ... }
In total there are around 1,100 variables. I would like a dataset of the form:
{name, date, title, job, location, notes, otherrole1_name, otherrole2_name, boardposition1_name, boardpositoon2_name}
That is individuals may only have one job at a time but they can have several (but not many) other roles and potentially several (but again not many) other board positions. The dates are recorded as being continuous but I was planning on assembling a dataset with a frequency of around 6months.
I have searched ardently, and experimented at length with the reshape command but confess to being at this point extremely confused. I tried to split the data up in to many individual datasets which could then be reshaped individually but this seems not to be a good strategy as it is not always the case that job10 follows after job9, for example). There are also sometimes gaps in the data where people leave but re-enter the dataset. I apologise for any duplication in this question, and would be immensely grateful for any help or suggestions.
Thanks,
Stuart
I have a dataset that with data on around 2,000 individuals and their employment histories. These histories cover a varying length of time upto about 50 years. The data are currently in a form {name, title, job1_location, job1_startdate job1_enddate, job1_type, job1_notes, job2_location, ..., job15_location, job15_startdate job15_enddate, job15_type, job15_notes, otherrole1_name, otherrole1_startdate, otherrole1_enddate, otherrole2_name, ..., boardposition1_name, boardposition1_startdate1,..., ... }
In total there are around 1,100 variables. I would like a dataset of the form:
{name, date, title, job, location, notes, otherrole1_name, otherrole2_name, boardposition1_name, boardpositoon2_name}
That is individuals may only have one job at a time but they can have several (but not many) other roles and potentially several (but again not many) other board positions. The dates are recorded as being continuous but I was planning on assembling a dataset with a frequency of around 6months.
I have searched ardently, and experimented at length with the reshape command but confess to being at this point extremely confused. I tried to split the data up in to many individual datasets which could then be reshaped individually but this seems not to be a good strategy as it is not always the case that job10 follows after job9, for example). There are also sometimes gaps in the data where people leave but re-enter the dataset. I apologise for any duplication in this question, and would be immensely grateful for any help or suggestions.
Thanks,
Stuart
Comment