Dear Statalisters,

My analysis is about finding to what extent government expenditures determine income inequality in an unbalanced panel data of European countries (1995-2020) while using time and country FE.
My dependent variable is the Gini index, and I run the same regressions with the population's top 10% income share as Y, as robustness check. I focus on Government expenditures as independent variable (total, education, health and defense), and I added a set of covariates that is standard in the literature.

One of these covariates is GDPpc and its squared value, to verify the Kuznets theory. In the literature, some authors take the log of both value. To my understanding, that is mainly helpful because it allows for easier interpretation, and also because it's in € while most of my other variables are in % of GDP.

My issue is that running the FE regression leads to the log(GDPpc)^2 to be omitted. I checked the correlation matrix, which indicated that log(GDPpc) and log(GDPpc^2) are indeed perfectly correlated, and I don't understand why. This issue does not arise when running the regressions with GDPpc and GDP^2 (no logs).

To construct both variables, I started off with GDPpc as raw data.
I then used the following commands to generate GDPpc^2, and then log(GDPpc) and log(GDPpc^2):
Code:
gen GDPpc2 = GDPpc^2
Code:
gen logGDPpc = log(GDPpc)
Code:
gen logGDPpc2 = log(GDPpc2)
I also tried generating the squared value with:
Code:
gen GDPpc2bis = c.GDPpc#c.GDPpc
but the outcome was the same.

As an indication: I run the following command for my regression, which is when I get the -omitted- message. I run the same one with the dependent var "top10sharePost" as robustness check.
Code:
xtreg gini_std_WIID lag_gini_std_WIID total_GE health_GE educ_GE defence_GE social_prot_GE logGDPpc logGDPpc2 hc Unempl TaxP TaxIn Trade CPI i.Year, fe robust
Here is a sniped of my data (I excluded some covariates as the full dataset exceeded linesize limit)
Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input float code str125 Country double Year float(gini_std_WIID lag_gini_std_WIID) double top10sharePost float lag_top10sharePost double(total_GE health_GE educ_GE defence_GE social_prot_GE GDPpc) float(GDPpc2 logGDPpc logGDPpc2 GDPpc2bis logGDPpc2bis)
1 "Austria"  1995 .3146     . .2654     . 55.8 6.7 5.5  .9 21.9 33790.4849857504 1141796864 10.427935  20.85587 1141796864  20.85587
1 "Austria"  1996     . .3146 .2644 .2654 55.6 6.7 5.5  .9 21.8 34537.7395746518 1192855424 10.449808 20.899616 1192855424 20.899616
1 "Austria"  1997     .     . .2606 .2644 52.3   7 5.4  .9 21.2 35220.8877426259 1240510976 10.469395  20.93879 1240510976  20.93879
1 "Austria"  1998 .3027     . .2698 .2606 52.2 7.1 5.3  .9 20.9 36442.2882333384 1328040320 10.503485  21.00697 1328040320  21.00697
1 "Austria"  1999     . .3027 .2622 .2698 52.1 7.3 5.4  .9 21.1 37664.9432792116 1418647936 10.536485  21.07297 1418647936  21.07297
1 "Austria"  2000     .     . .2737 .2622   51 7.1 5.2  .9 20.8 38842.8905195831 1508770176  10.56728  21.13456 1508770176  21.13456
1 "Austria"  2001 .2896     . .2607 .2737 51.4   7 5.2  .8 20.6 39184.8085972636 1535449216 10.576044  21.15209 1535449216  21.15209
1 "Austria"  2002     . .2896 .2749 .2607 51.1 7.3 5.2  .8 20.9 39636.4826114521 1571050752 10.587505  21.17501 1571050752  21.17501
1 "Austria"  2003     .     . .2917 .2749 51.3 7.4 5.3  .8   21 39815.2219533064 1585251840 10.592005  21.18401 1585251840  21.18401
1 "Austria"  2004  .296     . .2729 .2917 53.7 7.5 4.9  .8 20.6 40651.2266155811 1652522240 10.612784  21.22557 1652522240  21.22557
1 "Austria"  2005 .2991  .296 .2877 .2729 51.2 7.4 4.8  .8 20.2 41281.2707559522 1704143360 10.628164  21.25633 1704143360  21.25633
1 "Austria"  2006 .2876 .2991  .308 .2877 50.4 7.3 4.8  .7 19.9 42496.3510516831 1805939840 10.657173 21.314346 1805939840 21.314346
1 "Austria"  2007 .2968 .2876 .2877  .308 49.2 7.4 4.7  .8 19.4 43937.7128905744 1930522624 10.690528 21.381056 1930522624 21.381056
1 "Austria"  2008  .306 .2968 .2889 .2877 49.9 7.5 4.8  .9 19.6  44440.055889928 1974918528 10.701897 21.403793 1974918528 21.403793
1 "Austria"  2009 .3041  .306 .2716 .2889 54.1 7.8 5.1  .7 21.2 42655.1921304813 1819465472 10.660904  21.32181 1819465472  21.32181
1 "Austria"  2010 .3145 .3041 .2784 .2716 52.8 7.9 5.1  .6 21.4 43334.5089644691 1877879680 10.676704  21.35341 1877879680  21.35341
1 "Austria"  2011 .3038 .3145 .2722 .2784 50.9 7.7   5  .6 20.7 44451.0001918473 1975891456 10.702143 21.404285 1975891456 21.404285
1 "Austria"  2012 .3097 .3038  .254 .2722 51.2 7.7   5  .6 20.9  44549.881698231 1984691968 10.704365  21.40873 1984691968  21.40873
1 "Austria"  2013 .3063 .3097 .2545  .254 51.6 7.8   5  .6 21.3 44299.3781845446 1962434944 10.698726  21.39745 1962434944  21.39745
1 "Austria"  2014  .311 .3063   .27 .2545 52.4 7.9 4.9  .6 21.5 44245.1687398338 1957634944   10.6975    21.395 1957634944    21.395
1 "Austria"  2015 .3069  .311  .256   .27 51.1 8.2 4.9  .6 21.2 44195.8175947748 1953270272 10.696385  21.39277 1953270272  21.39277
1 "Austria"  2016 .3078 .3069 .2718  .256 50.1 8.2 4.9  .6   21 44590.2516278164 1988290560  10.70527  21.41054 1988290560  21.41054
1 "Austria"  2017 .3102 .3078 .2641 .2718 49.3 8.2 4.8  .6 20.6  45281.723399938 2050434432 10.720658 21.441317 2050434432 21.441317
1 "Austria"  2018 .3001 .3102 .2704 .2641 48.8 8.2 4.8  .6 20.2 46188.9665119872 2133420672 10.740497 21.480993 2133420672 21.480993
1 "Austria"  2019 .3101 .3001 .2573 .2704 48.6 8.3 4.8  .6 20.2 46669.7512148406 2178065664 10.750852 21.501703 2178065664 21.501703
1 "Austria"  2020  .304 .3101 .2795 .2573 56.7 9.1 5.1  .6 22.8 43346.4318485062 1878913152  10.67698  21.35396 1878913152  21.35396
2 "Belgium"  1995     .     . .2542     . 52.6   6 5.8 1.5 17.7  31329.892072751  981562112 10.352328 20.704657  981562112 20.704657
2 "Belgium"  1996 .2841     . .2549 .2542 53.1 6.4 5.9 1.4 17.9 31681.9363634502 1003745088 10.363502 20.727003 1003745088 20.727003
2 "Belgium"  1997 .2689 .2841 .2586 .2549 51.6   6 5.8 1.4 17.7 32804.3605402361 1076126080 10.398316  20.79663 1076126080  20.79663
2 "Belgium"  1998     . .2689 .2635 .2586   51 6.1 5.9 1.3 17.3 33376.5748398965 1113995776  10.41561  20.83122 1113995776  20.83122
2 "Belgium"  1999     .     . .2593 .2635 50.5 6.3 5.8 1.3 16.9 34479.9064484695 1188864000 10.448132 20.896263 1188864000 20.896263
2 "Belgium"  2000     .     . .2609 .2593 49.4 6.3 5.5 1.2 16.4 35674.7912530713 1272690688   10.4822   20.9644 1272690688   20.9644
2 "Belgium"  2001 .3315     . .2557 .2609 49.4 6.3 5.7 1.2 16.7 35943.2379602838 1291916416 10.489697 20.979393 1291916416 20.979393
2 "Belgium"  2002     . .3315 .2593 .2557 49.9 6.3 5.8 1.2 17.1 36393.2417665704 1324468096 10.502138 21.004276 1324468096 21.004276
2 "Belgium"  2003     .     . .2514 .2593   51 6.9 5.9 1.1 17.4 36617.3803840227 1340832512 10.508278 21.016556 1340832512 21.016556
2 "Belgium"  2004 .2834     . .2624 .2514 49.3 6.9 5.6 1.1 17.3 37761.2813189981 1425914368  10.53904  21.07808 1425914368  21.07808
2 "Belgium"  2005  .309 .2834 .2623 .2624 51.9 6.8 5.7 1.1 17.1 38426.0519083731 1476561408  10.55649  21.11298 1476561408  21.11298
2 "Belgium"  2006 .2938  .309 .2674 .2623 48.8 6.7 5.6   1 17.1 39147.7635597291 1532547328   10.5751   21.1502 1532547328   21.1502
2 "Belgium"  2007  .291 .2938 .2775 .2674 48.6 6.8 5.5   1 16.8 40290.2277563956 1623302400 10.603865  21.20773 1623302400  21.20773
2 "Belgium"  2008 .2953  .291 .2562 .2775 50.8 7.3 5.7 1.1 17.5 40151.8498740394 1612171008 10.600424  21.20085 1612171008  21.20085
2 "Belgium"  2009 .2844 .2953 .2628 .2562 54.7 7.8 6.1   1 19.2 39025.2207908291 1522967808 10.571963 21.143927 1522967808 21.143927
2 "Belgium"  2010 .2843 .2844 .2518 .2628 53.9 7.8   6   1 18.9 39777.9252767366 1582283392 10.591067 21.182135 1582283392 21.182135
2 "Belgium"  2011 .2849 .2843 .2524 .2518 55.3 7.7 6.2  .9 19.1 39929.0951439359 1594332672  10.59486  21.18972 1594332672  21.18972
2 "Belgium"  2012 .2833 .2849 .2517 .2524 56.5 7.9 6.3  .9 19.6 39975.5736402458 1598046464 10.596024 21.192047 1598046464 21.192047
2 "Belgium"  2013 .2793 .2833   .25 .2517 56.1   8 6.4  .9 20.1 39970.3174974794 1597626240 10.595892 21.191784 1597626240 21.191784
2 "Belgium"  2014 .2787 .2793  .252   .25 55.6   8 6.3  .9 19.8 40421.4207919096 1633891200 10.607115  21.21423 1633891200  21.21423
2 "Belgium"  2015 .2793 .2787 .2566  .252 53.7 7.8 6.3  .8 19.4  41008.296719472 1681680384  10.62153  21.24306 1681680384  21.24306
2 "Belgium"  2016 .2783 .2793 .2563 .2566 53.1 7.6 6.2  .8 19.4 41318.0196388476 1707178752 10.629054  21.25811 1707178752  21.25811
2 "Belgium"  2017 .2772 .2783 .2513 .2563   52 7.6 6.2  .8 19.3 41825.7628316432 1749394432 10.641268 21.282536 1749394432 21.282536
2 "Belgium"  2018 .2731 .2772  .247 .2513 52.2 7.6 6.2  .8 19.3  42403.533592766 1798059648 10.654987 21.309975 1798059648 21.309975
2 "Belgium"  2019 .2714 .2731 .2507  .247 51.8 7.5 6.1  .8 19.3 43065.5150654148 1854638592 10.670478 21.340956 1854638592 21.340956
2 "Belgium"  2020 .2715 .2714 .2489 .2507 59.2 8.8 6.6  .9 22.7 40424.6388411871 1634151424 10.607195  21.21439 1634151424  21.21439
3 "Bulgaria" 1995  .394     . .3513     . 31.7 1.9 3.6 1.3  8.5 4021.72281730795   16174254  8.299465  16.59893   16174254  16.59893
3 "Bulgaria" 1996  .367  .394 .3298 .3513 36.8 1.8 3.3 1.1  8.9 4252.94649834109   18087554  8.355368 16.710735   18087554 16.710735
3 "Bulgaria" 1997  .376  .367 .3201 .3298 31.8 2.1 3.3 1.9  8.6 3674.93181669676   13505124   8.20929  16.41858   13505124  16.41858
3 "Bulgaria" 1998  .355  .376 .3042 .3201 33.9 2.5 3.3 2.9  9.6 3839.71670227527   14743424  8.253154 16.506308   14743424 16.506308
3 "Bulgaria" 1999  .336  .355 .2959 .3042 41.4   5 4.1 2.9   12 3537.10582207864   12511118  8.171064 16.342129   12511118 16.342129
3 "Bulgaria" 2000  .342  .336 .2917 .2959   43 3.8 4.2 3.2 12.7 3717.67704162788   13821123  8.220855  16.44171   13821123  16.44171
3 "Bulgaria" 2001  .343  .342 .3071 .2917 40.6   4 3.6 2.6 12.6 3937.43486493199   15503393  8.278285  16.55657   15503393  16.55657
3 "Bulgaria" 2002   .38  .343 .3309 .3071 39.1 4.8 3.7 2.6 12.7 4260.11613781855   18148590  8.357052 16.714104   18148590 16.714104
3 "Bulgaria" 2003  .361   .38 .3116 .3309 38.6 5.5 4.2 2.5 12.2 4518.87824967162   20420260  8.416019 16.832039   20420260 16.832039
3 "Bulgaria" 2004  .368  .361 .3131 .3116 37.8 5.8   4 1.7   11 4849.54289640561   23518066   8.48664  16.97328   23518066  16.97328
3 "Bulgaria" 2005  .348  .368 .3182 .3131 36.7 4.9 4.1   2 10.6 5230.98370373178   27363190  8.562355  17.12471   27363190  17.12471
3 "Bulgaria" 2006   .32  .348 .3173 .3182 33.7 3.8 3.6 1.6 10.8 5629.41986656582   31690368  8.635761 17.271523   31690368 17.271523
3 "Bulgaria" 2007  .361   .32 .2975 .3173 37.7   4 3.6 1.4 10.1 6044.75941177202   36539116  8.706947 17.413895   36539116 17.413895
3 "Bulgaria" 2008 .3615  .361  .294 .2975 37.1 4.4   4 1.2 10.7 6459.64091191502   41726960  8.773329 17.546658   41726960 17.546658
3 "Bulgaria" 2009 .3361 .3615 .3139  .294 39.3   4 4.1 1.2 12.9 6288.67740963612   39547464  8.746506 17.493011   39547464 17.493011
3 "Bulgaria" 2010 .3384 .3361 .3158 .3139 36.1 4.4 3.6 1.7 12.9 6427.81006212601   41316744  8.768389 17.536777   41316744 17.536777
3 "Bulgaria" 2011 .3565 .3384   .32 .3158 33.7 4.1 3.4 1.2 12.2 6605.08982045823   43627212  8.795596 17.591192   43627212 17.591192
3 "Bulgaria" 2012 .3432 .3565 .3409   .32 34.3 4.4 3.3   1 12.3 6693.61236429071   44804448  8.808909 17.617819   44804448 17.617819
3 "Bulgaria" 2013 .3601 .3432 .3238 .3409 37.8 4.5 3.7 1.2 13.5 6693.45015260161   44802276  8.808885  17.61777   44802276  17.61777
3 "Bulgaria" 2014 .3657 .3601 .3398 .3238 43.2 5.5 4.1 1.3 13.3 6796.68911922266   46194984  8.824191 17.648382   46194984 17.648382
3 "Bulgaria" 2015 .3742 .3657 .3458 .3398 40.4 5.3 3.9 1.3   13 7074.68102325059   50051112  8.864278 17.728556   50051112 17.728556
3 "Bulgaria" 2016 .3857 .3742 .3827 .3458 34.8   5 3.4 1.1 12.3 7341.04761379451   53890980  8.901237 17.802473   53890980 17.802473
3 "Bulgaria" 2017 .4059 .3857 .3945 .3827 34.8 4.8 3.5 1.1 12.3 7599.12495683519   57746700  8.935788 17.871576   57746700 17.871576
3 "Bulgaria" 2018 .4038 .4059 .3999 .3945 36.9   5 3.5 1.2   12 7859.67803704994   61774540  8.969501 17.939001   61774540 17.939001
3 "Bulgaria" 2019 .4128 .4038 .3759 .3999 35.5 4.6 3.8 1.2 11.4 8234.78133356177   67811624  9.016122 18.032244   67811624 18.032244
3 "Bulgaria" 2020 .4027 .4128 .3765 .3759 41.8 5.9   4 1.5 13.1 7920.91133027298   62740836  8.977262 17.954523   62740836 17.954523
4 "Croatia"  1995     .     . .2682     .   52 7.8 6.3 2.6 13.1 7263.57088408122   52759460  8.890627 17.781254   52759460 17.781254
4 "Croatia"  1996     .     . .2776 .2682 50.1 7.2 5.9 2.3 13.2 7803.92196833084   60901200  8.962381 17.924763   60901200 17.924763
4 "Croatia"  1997     .     . .2806 .2776 48.8 6.9 5.7 2.3 12.7  8322.9639118574   69271728  9.026773 18.053547   69271728 18.053547
4 "Croatia"  1998 .2875     . .2762 .2806 50.8 7.2 6.2 2.2 14.4  8511.7818579482   72450432  9.049207 18.098413   72450432 18.098413
4 "Croatia"  1999 .2771 .2875 .2911 .2762 52.7 7.4 6.4 2.3 14.9 8473.71054411562   71803768 9.0447235 18.089447   71803768 18.089447
4 "Croatia"  2000 .3133 .2771 .2781 .2911 49.3 6.7 5.7   2 13.4 8805.50039515219   77536840  9.083132 18.166264   77536840 18.166264
4 "Croatia"  2001  .311 .3133 .2756 .2781 49.4 6.2 5.5 1.8 14.8  9428.4107203318   88894928  9.151483 18.302965   88894928 18.302965
4 "Croatia"  2002     .  .311 .2631 .2756 50.3 6.2   6 1.6 17.3 9962.04486657184   99242336  9.206537 18.413074   99242336 18.413074
4 "Croatia"  2003   .29     .   .26 .2631 49.6 6.1 5.7 1.4 14.8  10509.549672237  110450632  9.260039 18.520079  110450632 18.520079
4 "Croatia"  2004 .2968   .29 .2664   .26 48.6 6.4 5.4 1.6 14.8  10942.572413249  119739888  9.300416 18.600832  119739888 18.600832
4 "Croatia"  2005     . .2968  .279 .2664 46.5 6.2 5.1 1.4 13.7 11399.7753370191  129954880  9.341349 18.682697  129954880 18.682697
4 "Croatia"  2006     .     . .2784  .279 46.2 5.9 4.8 1.3 14.1 11959.9232084277  143039760  9.389317 18.778633  143039760 18.778633
4 "Croatia"  2007     .     . .2828 .2784 45.8 5.9 4.6 1.4 13.5 12550.2339482454  157508368  9.437494 18.874989  157508368 18.874989
4 "Croatia"  2008 .3371     . .2781 .2828 45.9 5.6 4.3 1.6 13.5 12789.6357975779  163574784   9.45639  18.91278  163574784  18.91278
4 "Croatia"  2009     . .3371 .2675 .2781 48.9 6.2 4.5 1.5   15 11870.7940008389  140915744  9.381836 18.763672  140915744 18.763672
4 "Croatia"  2010 .3256     . .2704 .2675 48.5 6.2 4.6 1.5   15 11748.9448312757  138037712  9.371519 18.743038  138037712 18.743038
4 "Croatia"  2011  .324 .3256 .2797 .2704 48.9 6.2 4.6 1.5 15.3 11779.5299874137  138757328  9.374119 18.748238  138757328 18.748238
4 "Croatia"  2012 .3231  .324 .2715 .2797 48.4 6.4 4.7 1.5   15 11546.7017379524  133326320  9.354156 18.708311  133326320 18.708311
4 "Croatia"  2013  .325 .3231 .2798 .2715 48.3 6.3 4.8 1.3 14.9 11536.8601564677  133099144  9.353302 18.706604  133099144 18.706604
4 "Croatia"  2014 .3202  .325 .2842 .2798 48.7 6.4 4.9 1.2 15.3   11543.87627967  133261080   9.35391  18.70782  133261080  18.70782
4 "Croatia"  2015 .3212 .3202 .2869 .2842 48.2 6.6 4.9 1.3 15.4 11933.3773788281  142405488 9.3870945 18.774189  142405488 18.774189
4 "Croatia"  2016 .3115 .3212 .2715 .2869 46.9 6.4 4.7 1.1 14.3 12441.5025378073  154790992  9.428793 18.857586  154790992 18.857586
end



Would you have an idea for my problem?

Thanks a lot for your time!
Melanie