Hi,
UGENT HELP PLEASE
I need to reshape my data from wide too long in order to merge it with already existing merged panel data. I have created a new variable, country, with a list of 38 countries. These countries have data on natural resources rents from years 1990 t0 2017. I need to make all these values into 1 column. Therefore creating a new variable, year. I have performed the command below but no luck;
Array
The letters B, C, D...are the variables representing the years 1990, 1991, 1992 ....which I am trying to merge into one column year.
I will also need to create a variable, nat, that will consists of the values of the total rents in all the years for each country in one column.
Thank you
Related Posts with Reshaping data from wide to long, creating new j variable
forval loop with a time range and a large dataset: can it faster?Dear Stata users, I am using Stata 15.0 I have a variable "Dyadic_Tie", and it should be counted h…
Graphic illustration of 3-way interaction between dummy, ordinal, and metric variableHi I am currently looking into how the election of Trump (main independent variable) affected satis…
query on time-series function for computing averageI am attempting to calculate average assets i.e. computed as average assets = (assets (t) + assets (…
Correct use of constraint in foreach cycleHi, I would like to set constraints later use them in a program. Here is a small example: sysuse au…
Where is program_name stored?Dear All, I have a program as follows: program BSE_02052018 version 12 syntax, MAINdirectory(str) …
Subscribe to:
Post Comments (Atom)
0 Response to Reshaping data from wide to long, creating new j variable
Post a Comment