Dear All,
I'm trying to reshape my employment data from a wide to a long format. I generally have the problem however that the variables are in a wide format both in terms of year, as well as in terms of job number. What I mean by this is that people might have held multiple jobs in the same year and each one is found in a new variables. The variable name structure therefore looks as follows: JobTenure_1987_03, where the first part is the variable, the second part (1987) the year, and the third part (here: 03) the number of the job held this year about which there is information (i.e. the variable provides information about tenure at the third job that individual has held in 1987. I am now looking get the data into a long format and wondering how to do so. I am not sure whether I should basically reshape the data twice (and have both variables for the number of the job entry in a specific year, as well as a variable for the year) or just using the year as a long format variable. Does anybody have any thoughts on the differences this would make in my analysis and what my stata syntax should look like to make this process efficient? I'm asking about the latter part as I have several dozen variables with the structure described above and I'm wondering whether there is a smart way to reshape this.
Thanks for the help,
J
I'm trying to reshape my employment data from a wide to a long format. I generally have the problem however that the variables are in a wide format both in terms of year, as well as in terms of job number. What I mean by this is that people might have held multiple jobs in the same year and each one is found in a new variables. The variable name structure therefore looks as follows: JobTenure_1987_03, where the first part is the variable, the second part (1987) the year, and the third part (here: 03) the number of the job held this year about which there is information (i.e. the variable provides information about tenure at the third job that individual has held in 1987. I am now looking get the data into a long format and wondering how to do so. I am not sure whether I should basically reshape the data twice (and have both variables for the number of the job entry in a specific year, as well as a variable for the year) or just using the year as a long format variable. Does anybody have any thoughts on the differences this would make in my analysis and what my stata syntax should look like to make this process efficient? I'm asking about the latter part as I have several dozen variables with the structure described above and I'm wondering whether there is a smart way to reshape this.
Thanks for the help,
J
Comment