I have a similar problem as last time. But slightly different and have been trying for a few hours and cannot seem to get it right.
The past thread similar to this was this one: https://www.statalist.org/forums/for...n-index-series
In short what I should get is an index with base year 2007 = 1, and the differences up to the end of the time series for every country.
How could I do this for this data set?
And for the record, would it be possible to split the different panels (countries) into different datasets? What i mean is to get, AT from year 2007 to the end of the time series, and put it in another country, and do it for every country?
Thank you.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str9 country int year float value "AT" 2007 92.5 "AT" 2008 97 "AT" 2009 95.3 "AT" 2010 99.1 "AT" 2011 103.8 "AT" 2012 104.8 "AT" 2013 103.7 "AT" 2014 102.2 "AT" 2015 100 "AT" 2016 97.5 "AT" 2017 99.4 "BE" 2007 90.9 "BE" 2008 99.3 "BE" 2009 92.2 "BE" 2010 97.2 "BE" 2011 105.1 "BE" 2012 108.8 "BE" 2013 109.4 "BE" 2014 104.4 "BE" 2015 100 "BE" 2016 98.2 "BE" 2017 106.9 "BG" 2007 78.2 "BG" 2008 88.6 "BG" 2009 84.8 "BG" 2010 90.9 "BG" 2011 98.7 "BG" 2012 104 "BG" 2013 102.6 "BG" 2014 101.7 "BG" 2015 100 "BG" 2016 97.1 "BG" 2017 101.2 "CH" 2007 102.3 "CH" 2008 106.6 "CH" 2009 104 "CH" 2010 104.6 "CH" 2011 104.9 "CH" 2012 104.4 "CH" 2013 104.2 "CH" 2014 103.5 "CH" 2015 100 "CH" 2016 98.6 "CH" 2017 98.4 "CY" 2007 85.7 "CY" 2008 95.7 "CY" 2009 94 "CY" 2010 97.8 "CY" 2011 103.5 "CY" 2012 111.9 "CY" 2013 109.5 "CY" 2014 106 "CY" 2015 100 "CY" 2016 95.3 "CY" 2017 98.9 "CZ" 2007 93.5 "CZ" 2008 97.7 "CZ" 2009 94.6 "CZ" 2010 95.8 "CZ" 2011 101.1 "CZ" 2012 103.3 "CZ" 2013 104.1 "CZ" 2014 103.3 "CZ" 2015 100 "CZ" 2016 96.7 "CZ" 2017 98.5 "DE" 2007 93.7 "DE" 2008 98.8 "DE" 2009 94.8 "DE" 2010 96.1 "DE" 2011 101 "DE" 2012 102.7 "DE" 2013 102.8 "DE" 2014 101.8 "DE" 2015 100 "DE" 2016 98.4 "DE" 2017 100.8 "DK" 2007 86.2 "DK" 2008 97.6 "DK" 2009 91.1 "DK" 2010 96.9 "DK" 2011 104.4 "DK" 2012 107.1 "DK" 2013 109.5 "DK" 2014 106.9 "DK" 2015 100 "DK" 2016 98.5 "DK" 2017 101.7 "EA19" 2007 92.8 "EA19" 2008 98.4 "EA19" 2009 93.6 "EA19" 2010 96.2 "EA19" 2011 101.7 "EA19" 2012 104.4 "EA19" 2013 104.2 "EA19" 2014 102.7 "EA19" 2015 100 "EA19" 2016 97.9 "EA19" 2017 100.8 "EE" 2007 79.8 end
0 Response to Changing the base year, and creating an index from that year in a time series
Post a Comment