Dear all,

I am currently trying to regress the growth rate of a variable on its initial level and an intercept. Specifically, the compound annual growth rate of GDP per capita is the dependent variable, and the regressor is the initial level of GDP. The growth rate is estimated over periods of 10 years, so the initial level GDP would be the GDP prevailing in the 1st year of each 10 year-period. An example of the data is provided below:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str3 countrycode int year float gdp
"DEU" 1991 33836.418
"DEU" 1992  34227.57
"DEU" 1993  33670.29
"DEU" 1994  34358.34
"DEU" 1995  34783.29
"DEU" 1996 34967.477
"DEU" 1997 35539.133
"DEU" 1998 36251.195
"DEU" 1999 36913.184
"DEU" 2000 37930.484
"DEU" 2001 38509.605
"DEU" 2002 38368.617
"DEU" 2003  38073.76
"DEU" 2004  38535.17
"DEU" 2005 38835.383
"DEU" 2006  40362.29
"DEU" 2007  41622.36
"DEU" 2008  42102.85
"DEU" 2009  39804.92
"DEU" 2010  41531.93
"DEU" 2011  43969.26
"DEU" 2012  44070.92
"DEU" 2013  44139.03
"DEU" 2014  44933.72
"DEU" 2015   45321.4
"DEU" 2016  45959.57
"DEU" 2017  46916.82
"FIN" 1991 31250.535
"FIN" 1992 30043.363
"FIN" 1993  29692.36
"FIN" 1994 30727.863
"FIN" 1995 31901.844
"FIN" 1996 32963.473
"FIN" 1997 34947.375
"FIN" 1998 36756.746
"FIN" 1999  38277.61
"FIN" 2000  40403.55
"FIN" 2001  41363.69
"FIN" 2002  41967.97
"FIN" 2003  42706.92
"FIN" 2004  44283.16
"FIN" 2005  45358.56
"FIN" 2006  47004.62
"FIN" 2007  49285.27
"FIN" 2008  49440.97
"FIN" 2009  45231.96
"FIN" 2010  46459.97
"FIN" 2011  47423.21
"FIN" 2012  46538.58
"FIN" 2013   45906.8
"FIN" 2014   45550.5
"FIN" 2015  45655.22
"FIN" 2016  46720.56
"FIN" 2017  48033.29
"FRA" 1991  32683.35
"FRA" 1992 33041.363
"FRA" 1993 32691.684
"FRA" 1994  33338.34
"FRA" 1995 33917.926
"FRA" 1996 34275.605
"FRA" 1997 34952.523
"FRA" 1998 36073.637
"FRA" 1999  37116.41
"FRA" 2000  38309.44
"FRA" 2001 38786.086
"FRA" 2002  38942.28
"FRA" 2003 38985.535
"FRA" 2004  39794.64
"FRA" 2005  40152.69
"FRA" 2006  40850.36
"FRA" 2007   41582.8
"FRA" 2008  41456.48
"FRA" 2009  40058.68
"FRA" 2010  40638.34
"FRA" 2011  41329.04
"FRA" 2012  41258.27
"FRA" 2013  41282.99
"FRA" 2014  41480.77
"FRA" 2015  41793.54
"FRA" 2016  42141.84
"FRA" 2017  43001.59
"NLD" 1991 36286.313
"NLD" 1992 36627.406
"NLD" 1993 36830.414
"NLD" 1994 37693.047
"NLD" 1995  38676.07
"NLD" 1996  39844.98
"NLD" 1997  41356.45
"NLD" 1998  43019.19
"NLD" 1999  44885.09
"NLD" 2000  46435.21
"NLD" 2001  47158.42
"NLD" 2002  46960.18
"NLD" 2003  46811.89
"NLD" 2004  47575.48
"NLD" 2005  48437.88
"NLD" 2006  50033.88
"NLD" 2007  51808.77
"NLD" 2008  52727.52
"NLD" 2009  50533.51
"NLD" 2010  50950.04
"NLD" 2011   51499.6
"NLD" 2012   50780.7
"NLD" 2013   50565.3
"NLD" 2014  51100.84
"NLD" 2015  51871.58
"NLD" 2016   52727.1
"NLD" 2017  53942.09
"SWE" 1991  36791.93
"SWE" 1992  36152.99
"SWE" 1993  35201.15
"SWE" 1994 36340.152
"SWE" 1995 37595.406
"SWE" 1996 38141.777
"SWE" 1997  39301.33
"SWE" 1998  40953.22
"SWE" 1999  42685.54
"SWE" 2000  44694.43
"SWE" 2001  45228.91
"SWE" 2002  46071.99
"SWE" 2003  46931.17
"SWE" 2004  48769.29
"SWE" 2005   49981.3
"SWE" 2006  51988.43
"SWE" 2007  53374.82
"SWE" 2008  52832.31
"SWE" 2009  50164.93
"SWE" 2010  52817.44
"SWE" 2011  54020.13
"SWE" 2012  53283.64
"SWE" 2013  53408.79
"SWE" 2014  54334.29
"SWE" 2015   56139.5
"SWE" 2016  56776.29
"SWE" 2017  57367.43
end
Here is where I get stuck and I do not know how to proceed. First, I do not want to do this regression for succesive years. Rather, I would like to do this regression for separate decades, so per country I should only have 3 datapoints considered in the regression: the periods 1991-2001,2001-2011,2007-2017. I realize that the last datapoint overlaps with the 2nd datapoint, but I do not have the data for 2018,2019,2020 so at least this way I can calculate the most recent compound annual growth rate. Problem is, I do not know how to write this down in a command to achieve this result. Moreover, I would like to control for period (decade effects) so I created a decadal identifier for the regression. I am currently using the following command to create decadal identifiers: gen decade=10*floor(year/10) but when I include it in my regression as reg gdp_growth initial_gdp i.decade, vce(cluster cc) the only decade dummy I see is 2010, whereas I think I should have at least 1 more? So I figured maybe I am not properly writing the code down for the decade dummies, so maybe there is a better way to write down a command to control for decade fixed effects.

I hope I have explained my question clear, and I am grateful for any advice you may have for me regarding this problem.

Thank you in advance.

Best,

Satya