I have panel data with 163 countries and 15 time units (months). I am trying to include interaction terms (between a dummy variable and time-dummy variables) in a random-effects regression. The first dummy variable (country_system) is equal to 1 if a country has a federal system, 0 otherwise. This is a sample of my data:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str8 country float(date country_system total_cases_per_million total_tests_per_thousand total_vaccinations_per_hundred median_age aged_65_older gdp_per_capita population_density hospital_beds_per_thousand) "AFG" 721 0 .026 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 722 0 4.495 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 723 0 54.639 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 724 0 390.667 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 725 0 809.359 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 726 0 941.859 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 727 0 980.237 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 728 0 1008.725 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 729 0 1064.135 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 730 0 1188.697 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 731 0 1323.612 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 732 0 1413.443 . . 18.6 2.581 1803.987 54.422 .5 "AFG" 733 0 1431.194 . .02 18.6 2.581 1803.987 54.422 .5 "AFG" 734 0 1450.203 . .14 18.6 2.581 1803.987 54.422 .5 "AFG" 735 0 1534.743 . .62 18.6 2.581 1803.987 54.422 .5 "AGO" 721 0 . . . 16.8 2.405 5819.495 23.89 .8 "AGO" 722 0 .213 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 723 0 .822 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 724 0 2.617 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 725 0 8.641 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 726 0 34.929 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 727 0 80.751 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 728 0 151.28 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 729 0 328.757 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 730 0 460.624 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 731 0 534.073 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 732 0 602.32 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 733 0 633.081 . . 16.8 2.405 5819.495 23.89 .8 "AGO" 734 0 678.842 . .4 16.8 2.405 5819.495 23.89 .8 "AGO" 735 0 810.923 . 1.39 16.8 2.405 5819.495 23.89 .8 "ALB" 721 0 . .009 . 38 13.188 11803.43 104.871 2.89 "ALB" 722 0 84.44 .539 . 38 13.188 11803.43 104.871 2.89 end format %tm date
where total_cases_per_million is my dependent variable and it represents the cumulative number of COVID-19 cases by country. Here there is my code with the output I get:
Code:
. quietly tab date, gen(dt) . gen dtfed1 = dt1*country_system . gen dtfed2 = dt2*country_system . gen dtfed3 = dt3*country_system ...... . gen dtfed14 = dt14*country_system . gen dtfed15 = dt15*country_system . xtreg total_cases_per_million country_system total_tests_per_thousand dtfed1-dtfed13 > people_vaccinated health_exp_percap population_density median_age aged_65_older gdp_per > _capita cardiovasc_death_rate diabetes_prevalence hospital_beds_per_thousand life_expec > tancy human_development_index, re vce(cluster country) note: dtfed1 omitted because of collinearity note: dtfed2 omitted because of collinearity note: dtfed3 omitted because of collinearity note: dtfed4 omitted because of collinearity note: dtfed5 omitted because of collinearity note: dtfed6 omitted because of collinearity note: dtfed7 omitted because of collinearity note: dtfed8 omitted because of collinearity note: dtfed9 omitted because of collinearity note: dtfed10 omitted because of collinearity Random-effects GLS regression Number of obs = 329 Group variable: n_country Number of groups = 96 R-sq: Obs per group: within = 0.6276 min = 1 between = 0.4878 avg = 3.4 overall = 0.4784 max = 5 Wald chi2(16) = 407.34 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000 (Std. Err. adjusted for 96 clusters in country) ---------------------------------------------------------------------------------------- | Robust total_cases_per_mill~n | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------------+---------------------------------------------------------------- country_system | -4533.477 5729.977 -0.79 0.429 -15764.03 6697.072 total_tests_per_thou~d | 3.967967 1.405584 2.82 0.005 1.213073 6.722861 dtfed1 | 0 (omitted) dtfed2 | 0 (omitted) dtfed3 | 0 (omitted) dtfed4 | 0 (omitted) dtfed5 | 0 (omitted) dtfed6 | 0 (omitted) dtfed7 | 0 (omitted) dtfed8 | 0 (omitted) dtfed9 | 0 (omitted) dtfed10 | 0 (omitted) dtfed11 | -2483.542 1959.533 -1.27 0.205 -6324.157 1357.072 dtfed12 | 2486.254 2175.846 1.14 0.253 -1778.326 6750.833 dtfed13 | 1294.719 1555.654 0.83 0.405 -1754.308 4343.745 people_vaccinated | 832.6324 100.6034 8.28 0.000 635.4533 1029.812 health_exp_percap | -59.18679 39.01102 -1.52 0.129 -135.647 17.27341 population_density | -5.558635 1.378589 -4.03 0.000 -8.260621 -2.856649 median_age | 754.4673 1075.997 0.70 0.483 -1354.448 2863.383 aged_65_older | 321.6327 1199.82 0.27 0.789 -2029.971 2673.236 gdp_per_capita | .0457816 .1851921 0.25 0.805 -.3171882 .4087514 cardiovasc_death_rate | 22.72593 24.80037 0.92 0.359 -25.88189 71.33376 diabetes_prevalence | 536.9487 926.1302 0.58 0.562 -1278.233 2352.131 hospital_beds_per_th~d | -1352.854 1303.595 -1.04 0.299 -3907.854 1202.146 life_expectancy | -259.1242 731.7597 -0.35 0.723 -1693.347 1175.098 human_development_in~x | 59745.43 49598.66 1.20 0.228 -37466.16 156957 _cons | -29163.35 34444.78 -0.85 0.397 -96673.88 38347.17 -----------------------+---------------------------------------------------------------- sigma_u | 19960.74 sigma_e | 6859.7266 rho | .89437211 (fraction of variance due to u_i) ----------------------------------------------------------------------------------------
Would anyone know how to solve this issue and which are the causes? I looked in previous posts but I could not find solutions that I could apply to this specific situation.
Thanks in advance to whoever is willing to help
Alessio
0 Response to Omitted variables in RE regression
Post a Comment