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
Merging panel data and analysisHello everyone, I intend to analyse panel data (long format) on effects of individuals taking a par…
Why is this -monthly("201901","YM")- not working, while this -date("20190101","YMD")- works perfectly fine?In my opinion this should be working: Code: . dis %tm monthly("201901", "YM") . but it is …
Syntax check for MLM with continuous dependent and independent variable and assessing for 2nd degree interaction 1) by time, and 2) by groupI am interested in doing: (1) MLM with a continuous dependent and independent variable, (2) Assessi…
Problem in using ivregress 2sls command in oaxacaHi everyone, I'm getting errors when I run the following code: oaxaca y x1 x2...x10, by(caste) poo…
Mean comparisonsing survey data in the following arrangement: Group: Firm_investment Q1 - each question has 1,2,3,…
Subscribe to:
Post Comments (Atom)
0 Response to Expanding dataset by one year keeping all values but changing one
Post a Comment