Is it valid to include country fixed and time fixed effects in multi level mixed model with -melogit-,-meqrlogit- or -xtmelogit- command alongwith random effects?
-
Login or Register
- Log in with
melogit EU_Goodmembership Gender Age i.Education4 i.Occupation Centerism i.CEECohort i.year || Country: || cyear:, /// Iteration log omitted Mixed-effects logistic regression Number of obs = 107,893 ------------------------------------------------------------- | No. of Observations per Group Group Variable | Groups Minimum Average Maximum ----------------+-------------------------------------------- Country | 10 8,408 10,789.3 13,365 cyear | 90 517 1,198.8 2,599 ------------------------------------------------------------- Integration method: mvaghermite Integration pts. = 7 Wald chi2(27) = 552.82 Log likelihood = -34359.284 Prob > chi2 = 0.0000 ---------------------------------------------------------------------------------------------------------------- EU_Goodmembership | Coef. Std. Err. z P>|z| [95% Conf. Interval] -----------------------------------------------+---------------------------------------------------------------- Gender | .0958534 .0209913 4.57 0.000 .0547113 .1369955 Age | -.0077781 .0021742 -3.58 0.000 -.0120395 -.0035168 | Education4 | 16-19 years | .177717 .0286765 6.20 0.000 .1215121 .2339219 20+ years | .4348324 .0344087 12.64 0.000 .3673925 .5022723 Still Studying | .0970692 .3519061 0.28 0.783 -.5926541 .7867925 No full time education | -.1857 .1669297 -1.11 0.266 -.5128763 .1414762 | Occupation | Managers (coded 10 to 12 in V432) | .0708984 .0572618 1.24 0.216 -.0413328 .1831295 Other white collars (coded 13 or 14 in V432) | -.0850771 .0513118 -1.66 0.097 -.1856464 .0154922 Manual workers (coded 15 to 18 in V432) | -.1472843 .0486853 -3.03 0.002 -.2427057 -.051863 House persons (coded 1 in V432) | -.2099896 .0705756 -2.98 0.003 -.3483152 -.0716641 Unemployed (coded 3 in V432) | -.3104216 .0552211 -5.62 0.000 -.418653 -.2021902 Retired (coded 4 in V432) | -.1744436 .0542082 -3.22 0.001 -.2806897 -.0681976 Students (coded 2 in V432) | .2277265 .3547057 0.64 0.521 -.4674838 .9229369 | Centerism | .1047876 .0210369 4.98 0.000 .063556 .1460192 | CEECohort | Exclusive Nat. Id. Cohort | -.0972863 .043503 -2.24 0.025 -.1825507 -.0120219 Pre-Democracy Cohort | -.2197141 .0669892 -3.28 0.001 -.3510105 -.0884176 Elementary Democracy Cohort | -.2594702 .0989821 -2.62 0.009 -.4534716 -.0654688 Mature Democracy Cohort | -.2181035 .110254 -1.98 0.048 -.4341974 -.0020095 EU Cohort | -.361624 .1344347 -2.69 0.007 -.6251112 -.0981368 | year | 2005 | -.1971077 .127506 -1.55 0.122 -.447015 .0527995 2006 | -.0330447 .1322088 -0.25 0.803 -.2921692 .2260798 2007 | -.03179 .1284018 -0.25 0.804 -.2834529 .2198729 2008 | -.2108615 .1278694 -1.65 0.099 -.4614808 .0397579 2009 | -.2983127 .126828 -2.35 0.019 -.546891 -.0497345 2010 | -.3772642 .1307442 -2.89 0.004 -.6335181 -.1210103 2013 | -.3558175 .1313589 -2.71 0.007 -.6132761 -.0983588 2015 | -.4296779 .1315059 -3.27 0.001 -.6874248 -.171931 | _cons | 2.736926 .2106566 12.99 0.000 2.324046 3.149805 -----------------------------------------------+---------------------------------------------------------------- Country | var(_cons)| .0995162 .0485897 .0382197 .2591197 -----------------------------------------------+---------------------------------------------------------------- Country>cyear | var(_cons)| .0717233 .0131501 .0500723 .1027363 ---------------------------------------------------------------------------------------------------------------- LR test vs. logistic model: chi2(2) = 1826.78 Prob > chi2 = 0.0000
margins, at(year=(1(1)9)) over (CEECohort) Predictive margins Number of obs = 107,893 Model VCE : OIM Expression : Marginal predicted mean, predict() over : CEECohort 1._at : 1.CEECohort year = 1 2.CEECohort year = 1 3.CEECohort year = 1 4.CEECohort year = 1 5.CEECohort year = 1 6.CEECohort year = 1 2._at : 1.CEECohort year = 2 2.CEECohort year = 2 3.CEECohort year = 2 4.CEECohort year = 2 5.CEECohort year = 2 6.CEECohort year = 2 \\\ *Continues sequentially until year 9 (2015) ------------------------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------------------------+---------------------------------------------------------------- _at#CEECohort | 1#WWII Cohort | .9043577 .0117522 76.95 0.000 .8813238 .9273915 1#Exclusive Nat. Id. Cohort | .9078451 .0113353 80.09 0.000 .8856282 .930062 1#Pre-Democracy Cohort | .9150386 .0104679 87.41 0.000 .8945219 .9355553 1#Elementary Democracy Cohort | .9217715 .009989 92.28 0.000 .9021935 .9413495 1#Mature Democracy Cohort | .9307186 .0088544 105.11 0.000 .9133642 .9480729 1#EU Cohort | .9299433 .0092226 100.83 0.000 .9118674 .9480192 2#WWII Cohort | .8862858 .0135769 65.28 0.000 .8596755 .9128962 2#Exclusive Nat. Id. Cohort | .8903472 .0131028 67.95 0.000 .8646661 .9160283 2#Pre-Democracy Cohort | .8987534 .0121327 74.08 0.000 .8749737 .922533 2#Elementary Democracy Cohort | .9066176 .0116196 78.02 0.000 .8838435 .9293917 2#Mature Democracy Cohort | .9171214 .0103356 88.73 0.000 .8968639 .9373788 2#EU Cohort | .9161988 .01076 85.15 0.000 .8951095 .9372881 3#WWII Cohort | .901515 .0123733 72.86 0.000 .8772639 .9257661 3#Exclusive Nat. Id. Cohort | .9050945 .0119203 75.93 0.000 .881731 .9284579 3#Pre-Democracy Cohort | .9124818 .0110133 82.85 0.000 .8908961 .9340675 3#Elementary Democracy Cohort | .9193956 .0104971 87.59 0.000 .8988216 .9399696 3#Mature Democracy Cohort | .9285905 .0093141 99.70 0.000 .9103353 .9468457 3#EU Cohort | .9277921 .0096695 95.95 0.000 .9088402 .9467439 4#WWII Cohort | .9016243 .0120501 74.82 0.000 .8780065 .925242 4#Exclusive Nat. Id. Cohort | .9052002 .0115953 78.07 0.000 .8824738 .9279266 4#Pre-Democracy Cohort | .9125801 .0107096 85.21 0.000 .8915896 .9335706 4#Elementary Democracy Cohort | .919487 .0102265 89.91 0.000 .8994433 .9395306 4#Mature Democracy Cohort | .9286724 .0090662 102.43 0.000 .9109029 .9464418 4#EU Cohort | .9278748 .009414 98.56 0.000 .9094236 .946326 5#WWII Cohort | .8849218 .0137399 64.41 0.000 .8579921 .9118515 5#Exclusive Nat. Id. Cohort | .8890254 .0132293 67.20 0.000 .8630965 .9149544 5#Pre-Democracy Cohort | .8975212 .0122466 73.29 0.000 .8735183 .9215241 5#Elementary Democracy Cohort | .905469 .0117342 77.16 0.000 .8824703 .9284677 5#Mature Democracy Cohort | .9160885 .0104427 87.73 0.000 .8956211 .9365558 5#EU Cohort | .9151548 .0108295 84.51 0.000 .8939293 .9363803 6#WWII Cohort | .8759193 .01454 60.24 0.000 .8474214 .9044171 6#Exclusive Nat. Id. Cohort | .880298 .0139894 62.93 0.000 .8528792 .9077168 6#Pre-Democracy Cohort | .8893787 .0129702 68.57 0.000 .8639575 .9147999 6#Elementary Democracy Cohort | .8978718 .0124525 72.10 0.000 .8734654 .9222783 6#Mature Democracy Cohort | .9092485 .011105 81.88 0.000 .887483 .9310139 6#EU Cohort | .9082414 .0115105 78.91 0.000 .8856813 .9308015 7#WWII Cohort | .8672903 .0157813 54.96 0.000 .8363594 .8982212 7#Exclusive Nat. Id. Cohort | .8719266 .0151955 57.38 0.000 .842144 .9017093 7#Pre-Democracy Cohort | .8815571 .0141018 62.51 0.000 .8539181 .9091961 7#Elementary Democracy Cohort | .8905626 .0135404 65.77 0.000 .8640239 .9171012 7#Mature Democracy Cohort | .9026544 .0120987 74.61 0.000 .8789413 .9263675 7#EU Cohort | .9015769 .0125048 72.10 0.000 .877068 .9260858 8#WWII Cohort | .8696823 .0156012 55.74 0.000 .8391045 .9002601 8#Exclusive Nat. Id. Cohort | .8742478 .0149969 58.30 0.000 .8448545 .9036412 8#Pre-Democracy Cohort | .8837269 .0139013 63.57 0.000 .8564808 .9109731 8#Elementary Democracy Cohort | .8925914 .0133381 66.92 0.000 .8664492 .9187336 8#Mature Democracy Cohort | .904486 .0119227 75.86 0.000 .881118 .927854 8#EU Cohort | .9034281 .0122798 73.57 0.000 .8793601 .927496 9#WWII Cohort | .8612914 .0164077 52.49 0.000 .8291329 .8934499 9#Exclusive Nat. Id. Cohort | .8661033 .0157748 54.90 0.000 .8351852 .8970214 9#Pre-Democracy Cohort | .8761097 .0146475 59.81 0.000 .8474012 .9048182 9#Elementary Democracy Cohort | .8854653 .0140849 62.87 0.000 .8578594 .9130713 9#Mature Democracy Cohort | .8980483 .0126064 71.24 0.000 .8733401 .9227564 9#EU Cohort | .8969219 .0129686 69.16 0.000 .8715038 .9223399 ------------------------------------------------------------------------------------------------
margins, dydx(CEECohort) at(year=(1(1)9))
margins CEECohort, at(year=(1(1)9)) predict(mu fixedonly) vsquish Predictive margins Number of obs = 107,893 Model VCE : OIM Expression : Predicted mean, fixed portion only, predict(mu fixedonly) 1._at : year = 1 2._at : year = 2 3._at : year = 3 4._at : year = 4 5._at : year = 5 6._at : year = 6 7._at : year = 7 8._at : year = 8 9._at : year = 9 ------------------------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------------------------+---------------------------------------------------------------- _at#CEECohort | 1#WWII Cohort | .9327901 .0089621 104.08 0.000 .9152248 .9503555 1#Exclusive Nat. Id. Cohort | .9264647 .0093494 99.09 0.000 .9081402 .9447891 1#Pre-Democracy Cohort | .9177319 .0102259 89.75 0.000 .8976896 .9377742 1#Elementary Democracy Cohort | .9147001 .0113208 80.80 0.000 .8925117 .9368885 1#Mature Democracy Cohort | .9178526 .0112347 81.70 0.000 .8958329 .9398723 1#EU Cohort | .9064439 .0138727 65.34 0.000 .8792539 .933634 2#WWII Cohort | .9194121 .0105863 86.85 0.000 .8986633 .9401609 2#Exclusive Nat. Id. Cohort | .9119541 .0109745 83.10 0.000 .8904445 .9334637 2#Pre-Democracy Cohort | .9016925 .0119077 75.72 0.000 .8783539 .9250311 2#Elementary Democracy Cohort | .8981392 .0131328 68.39 0.000 .8723995 .923879 2#Mature Democracy Cohort | .9018341 .0130292 69.22 0.000 .8762973 .9273709 2#EU Cohort | .8884873 .0160046 55.51 0.000 .8571188 .9198558 3#WWII Cohort | .9307 .0095264 97.70 0.000 .9120286 .9493714 3#Exclusive Nat. Id. Cohort | .9241949 .009902 93.33 0.000 .9047873 .9436025 3#Pre-Democracy Cohort | .9152189 .0107611 85.05 0.000 .8941275 .9363102 3#Elementary Democracy Cohort | .9121039 .0118055 77.26 0.000 .8889656 .9352422 3#Mature Democracy Cohort | .9153429 .0116753 78.40 0.000 .8924597 .9382262 3#EU Cohort | .9036246 .0143205 63.10 0.000 .875557 .9316921 4#WWII Cohort | .9307805 .0093412 99.64 0.000 .9124721 .9490888 4#Exclusive Nat. Id. Cohort | .9242822 .0096626 95.66 0.000 .9053439 .9432206 4#Pre-Democracy Cohort | .9153155 .0104588 87.52 0.000 .8948166 .9358144 4#Elementary Democracy Cohort | .9122037 .0114828 79.44 0.000 .8896979 .9347096 4#Mature Democracy Cohort | .9154395 .0113482 80.67 0.000 .8931975 .9376815 4#EU Cohort | .903733 .0139481 64.79 0.000 .8763953 .9310707 5#WWII Cohort | .9183936 .0108754 84.45 0.000 .8970783 .9397089 5#Exclusive Nat. Id. Cohort | .9108511 .0111874 81.42 0.000 .8889241 .932778 5#Pre-Democracy Cohort | .9004758 .0120154 74.94 0.000 .876926 .9240256 5#Elementary Democracy Cohort | .8968839 .01314 68.26 0.000 .87113 .9226378 5#Mature Democracy Cohort | .900619 .0129847 69.36 0.000 .8751695 .9260684 5#EU Cohort | .8871289 .0158628 55.92 0.000 .8560383 .9182195 6#WWII Cohort | .9116411 .0116658 78.15 0.000 .8887765 .9345057 6#Exclusive Nat. Id. Cohort | .9035441 .01194 75.67 0.000 .8801422 .9269461 6#Pre-Democracy Cohort | .8924249 .0127498 70.00 0.000 .8674358 .9174141 6#Elementary Democracy Cohort | .8885805 .0139064 63.90 0.000 .8613244 .9158366 6#Mature Democracy Cohort | .8925782 .0137408 64.96 0.000 .8656468 .9195096 6#EU Cohort | .8781528 .0167406 52.46 0.000 .8453418 .9109638 7#WWII Cohort | .9051188 .0127786 70.83 0.000 .8800731 .9301645 7#Exclusive Nat. Id. Cohort | .8964961 .013071 68.59 0.000 .8708774 .9221148 7#Pre-Democracy Cohort | .8846742 .0138981 63.65 0.000 .8574345 .911914 7#Elementary Democracy Cohort | .880592 .0150655 58.45 0.000 .8510642 .9101198 7#Mature Democracy Cohort | .884837 .0148565 59.56 0.000 .8557189 .9139552 7#EU Cohort | .8695325 .0179563 48.42 0.000 .8343388 .9047261 8#WWII Cohort | .9069317 .0127597 71.08 0.000 .8819232 .9319403 8#Exclusive Nat. Id. Cohort | .8984542 .0129787 69.23 0.000 .8730165 .9238919 8#Pre-Democracy Cohort | .8868261 .0136705 64.87 0.000 .8600323 .9136198 8#Elementary Democracy Cohort | .8828094 .0146885 60.10 0.000 .8540205 .9115982 8#Mature Democracy Cohort | .8869863 .0144258 61.49 0.000 .8587122 .9152604 8#EU Cohort | .8719237 .0173454 50.27 0.000 .8379274 .90592 9#WWII Cohort | .9005556 .0136454 66.00 0.000 .8738112 .9273 9#Exclusive Nat. Id. Cohort | .8915709 .0138103 64.56 0.000 .8645032 .9186386 9#Pre-Democracy Cohort | .8792666 .0144325 60.92 0.000 .8509793 .9075538 9#Elementary Democracy Cohort | .8750215 .0154155 56.76 0.000 .8448076 .9052354 9#Mature Democracy Cohort | .8794359 .0150951 58.26 0.000 .84985 .9090218 9#EU Cohort | .8635303 .0180622 47.81 0.000 .828129 .8989316 ------------------------------------------------------------------------------------------------
melogit EU_Goodmembership Gender Age i.Education4 i.Occupation Centerism i.CohortOver86 i.year || Country: || cyear:, evaltype(gf0)
margins, dydx(CEECohort) at(year=(1(1)9))
margins dydx(CEECohort), at(year=(1(1)9))
Comment