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
system error messageI have STATA/MP 14.0. I have around 7500 firm year observations. I was running my regressions normal…
Problem with xi - syntaxI just realized the solution. Sorry. When you are making only dummies with xi and not running a com…
meologit var(_cons) too small, problem?I ran an meologit for my cluster RCT data; the clustering var(_cons) comes out to be 9.90e-32, S.E 5…
Adjusting bar sizeHi, I hope everyone here is safe working from home. I am working with bar charts from my real-time …
where does -simulate- save the returned results each time?Dear Statalist, I have questions regarding the way that the command -simulation- runs the pre-defin…
Subscribe to:
Post Comments (Atom)
0 Response to Expanding dataset by one year keeping all values but changing one
Post a Comment