Dear all,
I need to merge two datasets for my work, but to do so, I first need to reshape my document such that my variables are the column titles.
I reshaped first using :
reshape long q, i(variables) j(year) string
I tried to separate variables, by(variables),
and use reshape wide variables1 variables2 variables3, i(variables) j(year) string
This is the closest I came to get to what I'm trying to do.
In the other document, I generated a numeric variable called time_var, but the data was in this format. I think what I'm trying to do will help me merge my documents.
Thank you for your time.
I need to merge two datasets for my work, but to do so, I first need to reshape my document such that my variables are the column titles.
I reshaped first using :
reshape long q, i(variables) j(year) string
I tried to separate variables, by(variables),
and use reshape wide variables1 variables2 variables3, i(variables) j(year) string
This is the closest I came to get to what I'm trying to do.
In the other document, I generated a numeric variable called time_var, but the data was in this format. I think what I'm trying to do will help me merge my documents.
Thank you for your time.
Comment