Dear all,
I have a wide dataset, in the following form:
country y15 y14 y13 y12
Albania 36 33 31 33
Armenia 35 37 36 34
Austria 76 72 69 69
Azerbaijan 29 29 28 27
Belarus 32 31 29 31
The y15, y14, ... are actually observation of the same variable in different years. In order to perform the regression I want to do, I need the data in the long form, with the different y attached to the observed country, and a new variable indicating the year. I want to have a dataset that looks like this:
country year y
Albania 2015 36
Albania 2014 33
I realized that is feasible using reshape. Unfortunately, nor the help nor a number of try helped me to do want I want to do. Any suggestion?
Thanks in advance to all of you!
I have a wide dataset, in the following form:
country y15 y14 y13 y12
Albania 36 33 31 33
Armenia 35 37 36 34
Austria 76 72 69 69
Azerbaijan 29 29 28 27
Belarus 32 31 29 31
The y15, y14, ... are actually observation of the same variable in different years. In order to perform the regression I want to do, I need the data in the long form, with the different y attached to the observed country, and a new variable indicating the year. I want to have a dataset that looks like this:
country year y
Albania 2015 36
Albania 2014 33
I realized that is feasible using reshape. Unfortunately, nor the help nor a number of try helped me to do want I want to do. Any suggestion?
Thanks in advance to all of you!