I am trying to include interaction terms (between a dummy variable and time-dummy variables) in a random-effects regression in order to estimate the impact of the system of government in COVID-19 outcomes. This is a sample of my dataset:
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str8 country float(date total_cases_per_million country_system total_tests_per_thousand population_density aged_65_older gdp_per_capita) "AFG" 721 .026 0 . 54.422 2.581 1803.987 "AFG" 722 4.495 0 . 54.422 2.581 1803.987 "AFG" 723 54.639 0 . 54.422 2.581 1803.987 "AFG" 724 390.667 0 . 54.422 2.581 1803.987 "AFG" 725 809.359 0 . 54.422 2.581 1803.987 "AFG" 726 941.859 0 . 54.422 2.581 1803.987 "AFG" 727 980.237 0 . 54.422 2.581 1803.987 "AFG" 728 1008.725 0 . 54.422 2.581 1803.987 "AFG" 729 1064.135 0 . 54.422 2.581 1803.987 "AFG" 730 1188.697 0 . 54.422 2.581 1803.987 "AFG" 731 1323.612 0 . 54.422 2.581 1803.987 "AFG" 732 1413.443 0 . 54.422 2.581 1803.987 "AFG" 733 1431.194 0 . 54.422 2.581 1803.987 "AFG" 734 1450.203 0 . 54.422 2.581 1803.987 "AFG" 735 1534.743 0 . 54.422 2.581 1803.987 "AGO" 721 . 0 . 23.89 2.405 5819.495 "AGO" 722 .213 0 . 23.89 2.405 5819.495 "AGO" 723 .822 0 . 23.89 2.405 5819.495 "AGO" 724 2.617 0 . 23.89 2.405 5819.495 "AGO" 725 8.641 0 . 23.89 2.405 5819.495 "AGO" 726 34.929 0 . 23.89 2.405 5819.495 "AGO" 727 80.751 0 . 23.89 2.405 5819.495 "AGO" 728 151.28 0 . 23.89 2.405 5819.495 "AGO" 729 328.757 0 . 23.89 2.405 5819.495 "AGO" 730 460.624 0 . 23.89 2.405 5819.495 "AGO" 731 534.073 0 . 23.89 2.405 5819.495 "AGO" 732 602.32 0 . 23.89 2.405 5819.495 "AGO" 733 633.081 0 . 23.89 2.405 5819.495 "AGO" 734 678.842 0 . 23.89 2.405 5819.495 "AGO" 735 810.923 0 . 23.89 2.405 5819.495 "ALB" 721 . 0 .009 104.871 13.188 11803.43 "ALB" 722 84.44 0 .539 104.871 13.188 11803.43 "ALB" 723 268.608 0 2.826 104.871 13.188 11803.43 "ALB" 724 395.093 0 5.075 104.871 13.188 11803.43 "ALB" 725 880.881 0 8.178 104.871 13.188 11803.43 "ALB" 726 1833.345 0 12.83 104.871 13.188 11803.43 "ALB" 727 3305.65 0 20.282 104.871 13.188 11803.43 "ALB" 728 4742.859 0 29.04 104.871 13.188 11803.43 "ALB" 729 7253.805 0 41.959 104.871 13.188 11803.43 "ALB" 730 13267.774 0 61.553 104.871 13.188 11803.43 "ALB" 731 20264.09 0 86.012 104.871 13.188 11803.43 "ALB" 732 27148.17 0 119.226 104.871 13.188 11803.43 "ALB" 733 37239.21 0 154.441 104.871 13.188 11803.43 "ALB" 734 43490.52 0 186.457 104.871 13.188 11803.43 "ALB" 735 45550.42 0 212.268 104.871 13.188 11803.43 "AND" 721 . 0 . 163.755 17.36 145 "AND" 722 4866.369 0 . 163.755 17.36 145 "AND" 723 9642.141 0 . 163.755 17.36 145 "AND" 724 9888.048 0 . 163.755 17.36 145 "AND" 725 11065.812 0 . 163.755 17.36 145 end format %tm date
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 dtfed1-dtfed13 total_tests_per_thousand total_vaccinatio > ns_per_hundred health_exp_percap population_density median_age aged_65_older gdp_per_ca > pita cardiovasc_death_rate diabetes_prevalence hospital_beds_per_thousand life_expectan > cy 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 = 355 Group variable: n_country Number of groups = 98 R-sq: Obs per group: within = 0.6188 min = 1 between = 0.4673 avg = 3.6 overall = 0.4534 max = 5 Wald chi2(15) = 431.87 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000 (Std. Err. adjusted for 98 clusters in country) ---------------------------------------------------------------------------------------- | Robust total_cases_per_mill~n | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------------+---------------------------------------------------------------- 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 | -4446.301 1920.757 -2.31 0.021 -8210.915 -681.6861 dtfed12 | 1227.5 1805.337 0.68 0.497 -2310.895 4765.894 dtfed13 | 787.4111 1429.474 0.55 0.582 -2014.306 3589.128 total_tests_per_thou~d | 4.45421 1.505005 2.96 0.003 1.504455 7.403965 total_vaccinations_p~d | 511.9297 59.03842 8.67 0.000 396.2165 627.6428 health_exp_percap | -58.45041 39.52342 -1.48 0.139 -135.9149 19.01408 population_density | -4.688127 1.59506 -2.94 0.003 -7.814386 -1.561867 median_age | 605.3898 1127.326 0.54 0.591 -1604.128 2814.908 aged_65_older | 281.571 1342.56 0.21 0.834 -2349.798 2912.94 gdp_per_capita | .0264917 .2005317 0.13 0.895 -.3665433 .4195267 cardiovasc_death_rate | 16.41957 23.633 0.69 0.487 -29.90025 62.73939 diabetes_prevalence | 195.1546 906.3207 0.22 0.830 -1581.201 1971.511 hospital_beds_per_th~d | -7.09797 19.0103 -0.37 0.709 -44.35748 30.16154 life_expectancy | 384.9465 673.9632 0.57 0.568 -935.9971 1705.89 human_development_in~x | 24361.15 46636.84 0.52 0.601 -67045.38 115767.7 _cons | -45405.35 30746.72 -1.48 0.140 -105667.8 14857.11 -----------------------+---------------------------------------------------------------- sigma_u | 20273.189 sigma_e | 6873.5459 rho | .89689939 (fraction of variance due to u_i) ---------------------------------------------------------------------------------------- . end of do-file
Thank you in advance for your time and Best regards
Alessio Lombini
0 Response to Many interaction terms omitted in panel regression
Post a Comment