Hey,
I'm working with a dataset that contains the following variables: year, country (all country names are strings), countrycode and some variable etfra which measures ethnic fractionilization. The data set starts in 1990 and ends in 2013. What I need to do is to expand the set to the year 2014 for each country and using the median of the years 2009-2013 to fill in the ef_etfra of 2014. Im not entirely sure how to approach this, tried different things using a foreach loop but they all were quite unsuccessful. I'd be thankful for any hint or concrete code suggestion. Thanks a lot in advance!
Related Posts with Expanding dataset by one year keeping all values but changing one
Impact of policyHello, I am new to Stata and I want to determine the impact of a policy on 8 countries using a 9 yea…
Oaxaca analysisHi, I am trying to use oaxaca command to run a nonlinar decomposition analysis I am using this code:…
Force Stata to not omit a variable and make consistent with an output in RI am using Stata 15. I have a situation where one of the independent dummy variables (election) is …
Tabulating same variable with different restrictions in the same tableHi fellow forum members, I'm trying to tabulate frequencies of the same variable in multiple columns…
Generating Descriptive GraphHi all, I have individual-year data where my variable of interest is a transition into employment (…
Subscribe to:
Post Comments (Atom)
0 Response to Expanding dataset by one year keeping all values but changing one
Post a Comment