. * Code from Williams, Allison, Moral-Benito paper . * xtdpdml version 2.12 or later is required. . version 13.1 . . *** Section 2 part 3: Sem code for Cornwell & Rupert . use https://www3.nd.edu/~rwilliam/statafiles/wages, clear . keep wks lwage union ed id t . xtset id t panel variable: id (strongly balanced) time variable: t, 1 to 7 delta: 1 unit . reshape wide wks lwage union, i(id) j(t) (note: j = 1 2 3 4 5 6 7) Data long -> wide ----------------------------------------------------------------------------- Number of obs. 4165 -> 595 Number of variables 6 -> 23 j variable (7 values) t -> (dropped) xij variables: wks -> wks1 wks2 ... wks7 lwage -> lwage1 lwage2 ... lwage7 union -> union1 union2 ... union7 ----------------------------------------------------------------------------- . sem (wks2 <- wks1@b1 lwage1@b2 union1@b3 ed@b4 Alpha@1 E2@1) /// > (wks3 <- wks2@b1 lwage2@b2 union2@b3 ed@b4 Alpha@1 E3@1) /// > (wks4 <- wks3@b1 lwage3@b2 union3@b3 ed@b4 Alpha@1 E4@1) /// > (wks5 <- wks4@b1 lwage4@b2 union4@b3 ed@b4 Alpha@1 E5@1) /// > (wks6 <- wks5@b1 lwage5@b2 union5@b3 ed@b4 Alpha@1 E6@1) /// > (wks7 <- wks6@b1 lwage6@b2 union6@b3 ed@b4 Alpha@1), /// > var(e.wks2@0 e.wks3@0 e.wks4@0 e.wks5@0 e.wks6@0) var(Alpha) /// > cov(Alpha*(ed)@0) cov(Alpha*(E2 E3 E4 E5 E6)@0) /// > cov(_OEx*(E2 E3 E4 E5 E6)@0) cov(E2*(E3 E4 E5 E6)@0) /// > cov(E3*(E4 E5 E6)@0) cov(E4*(E5 E6)@0) cov(E5*(E6)@0) /// > cov(union3*(E2)) cov(union4*(E2 E3)) cov(union5*(E2 E3 E4)) /// > cov(union6*(E2 E3 E4 E5)) /// > iterate(250) technique(nr 25 bhhh 25) noxconditional Endogenous variables Observed: wks2 wks3 wks4 wks5 wks6 wks7 Exogenous variables Observed: wks1 lwage1 union1 ed lwage2 union2 lwage3 union3 lwage4 union4 lwage5 union5 lwage6 union6 Latent: Alpha E2 E3 E4 E5 E6 Fitting conditional model: (setting technique to nr) Iteration 0: log likelihood = -73402.179 Iteration 1: log likelihood = -46014.892 Iteration 2: log likelihood = -29009.789 Iteration 3: log likelihood = -22034.302 Iteration 4: log likelihood = -19430.01 Iteration 5: log likelihood = -18412.259 Iteration 6: log likelihood = -18131.142 Iteration 7: log likelihood = -18020.021 Iteration 8: log likelihood = -18016.249 Iteration 9: log likelihood = -18010.54 Iteration 10: log likelihood = -18010.305 Iteration 11: log likelihood = -18010.303 Iteration 12: log likelihood = -18010.303 Fitting target model: (setting technique to nr) Iteration 0: log likelihood = -18010.303 (not concave) Iteration 1: log likelihood = -16077.399 (not concave) Iteration 2: log likelihood = -15729.252 (not concave) Iteration 3: log likelihood = -15537.255 (not concave) Iteration 4: log likelihood = -15311.73 (not concave) Iteration 5: log likelihood = -14924.92 (not concave) Iteration 6: log likelihood = -14653.691 (not concave) Iteration 7: log likelihood = -14296.773 (not concave) Iteration 8: log likelihood = -14048.424 (not concave) Iteration 9: log likelihood = -13830.016 (not concave) Iteration 10: log likelihood = -13562.231 (not concave) Iteration 11: log likelihood = -13421.15 (not concave) Iteration 12: log likelihood = -13126.316 (not concave) Iteration 13: log likelihood = -13044.246 (not concave) Iteration 14: log likelihood = -12955.756 (not concave) Iteration 15: log likelihood = -12913.363 (not concave) Iteration 16: log likelihood = -12861.041 (not concave) Iteration 17: log likelihood = -12827.937 (not concave) Iteration 18: log likelihood = -12774.574 (not concave) Iteration 19: log likelihood = -12727.437 (not concave) Iteration 20: log likelihood = -12622.698 Iteration 21: log likelihood = -12458.956 Iteration 22: log likelihood = -12240.399 Iteration 23: log likelihood = -12228.68 Iteration 24: log likelihood = -12227.326 (switching technique to bhhh) Iteration 25: log likelihood = -12227.322 (not concave) Iteration 26: log likelihood = -12227.322 (not concave) Iteration 27: log likelihood = -12227.322 (not concave) Iteration 28: log likelihood = -12227.322 (not concave) Iteration 29: log likelihood = -12227.322 (not concave) Iteration 30: log likelihood = -12227.322 (not concave) Iteration 31: log likelihood = -12227.322 (not concave) Iteration 32: log likelihood = -12227.322 (not concave) Iteration 33: log likelihood = -12227.322 (not concave) Iteration 34: log likelihood = -12227.322 (not concave) Iteration 35: log likelihood = -12227.322 (not concave) Iteration 36: log likelihood = -12227.322 (not concave) Iteration 37: log likelihood = -12227.322 (not concave) Iteration 38: log likelihood = -12227.322 (not concave) Iteration 39: log likelihood = -12227.322 (not concave) Iteration 40: log likelihood = -12227.322 (not concave) Iteration 41: log likelihood = -12227.322 (not concave) Iteration 42: log likelihood = -12227.322 (not concave) Iteration 43: log likelihood = -12227.322 (not concave) Iteration 44: log likelihood = -12227.322 (not concave) Iteration 45: log likelihood = -12227.322 (not concave) Iteration 46: log likelihood = -12227.322 (not concave) Iteration 47: log likelihood = -12227.322 (not concave) Iteration 48: log likelihood = -12227.322 (not concave) Iteration 49: log likelihood = -12227.322 (not concave) (switching technique to nr) Iteration 50: log likelihood = -12227.322 (backed up) Structural equation model Number of obs = 595 Estimation method = ml Log likelihood = -12227.322 ( 1) - [wks2]wks1 + [wks3]wks2 = 0 ( 2) - [wks2]wks1 + [wks4]wks3 = 0 ( 3) - [wks2]wks1 + [wks5]wks4 = 0 ( 4) - [wks2]wks1 + [wks6]wks5 = 0 ( 5) - [wks2]wks1 + [wks7]wks6 = 0 ( 6) [wks2]lwage1 - [wks7]lwage6 = 0 ( 7) [wks2]union1 - [wks7]union6 = 0 ( 8) [wks2]ed - [wks7]ed = 0 ( 9) [wks2]Alpha = 1 (10) [wks2]E2 = 1 (11) [wks3]ed - [wks7]ed = 0 (12) [wks3]lwage2 - [wks7]lwage6 = 0 (13) [wks3]union2 - [wks7]union6 = 0 (14) [wks3]Alpha = 1 (15) [wks3]E3 = 1 (16) [wks4]ed - [wks7]ed = 0 (17) [wks4]lwage3 - [wks7]lwage6 = 0 (18) [wks4]union3 - [wks7]union6 = 0 (19) [wks4]Alpha = 1 (20) [wks4]E4 = 1 (21) [wks5]ed - [wks7]ed = 0 (22) [wks5]lwage4 - [wks7]lwage6 = 0 (23) [wks5]union4 - [wks7]union6 = 0 (24) [wks5]Alpha = 1 (25) [wks5]E5 = 1 (26) [wks6]ed - [wks7]ed = 0 (27) [wks6]lwage5 - [wks7]lwage6 = 0 (28) [wks6]union5 - [wks7]union6 = 0 (29) [wks6]Alpha = 1 (30) [wks6]E6 = 1 (31) [wks7]Alpha = 1 (32) [var(e.wks2)]_cons = 0 (33) [var(e.wks3)]_cons = 0 (34) [var(e.wks4)]_cons = 0 (35) [var(e.wks5)]_cons = 0 (36) [var(e.wks6)]_cons = 0 ----------------------------------------------------------------------------------- | OIM | Coef. Std. Err. z P>|z| [95% Conf. Interval] ------------------+---------------------------------------------------------------- Structural | wks2 | wks1 | .1871266 .0201939 9.27 0.000 .1475473 .2267059 lwage1 | .6417917 .4842304 1.33 0.185 -.3072823 1.590866 union1 | -1.191349 .5168951 -2.30 0.021 -2.204445 -.1782536 ed | -.1122267 .0559477 -2.01 0.045 -.2218822 -.0025711 Alpha | 1 5.01e-16 2.0e+15 0.000 1 1 E2 | 1 6.66e-16 1.5e+15 0.000 1 1 _cons | 36.14037 2.886827 12.52 0.000 30.48229 41.79845 ----------------+---------------------------------------------------------------- wks3 | wks2 | .1871266 .0201939 9.27 0.000 .1475473 .2267059 ed | -.1122267 .0559477 -2.01 0.045 -.2218822 -.0025711 lwage2 | .6417917 .4842304 1.33 0.185 -.3072823 1.590866 union2 | -1.191349 .5168951 -2.30 0.021 -2.204445 -.1782536 Alpha | 1 1.13e-15 8.9e+14 0.000 1 1 E3 | 1 1.55e-16 6.4e+15 0.000 1 1 _cons | 35.9534 2.92939 12.27 0.000 30.2119 41.6949 ----------------+---------------------------------------------------------------- wks4 | wks3 | .1871266 .0201939 9.27 0.000 .1475473 .2267059 ed | -.1122267 .0559477 -2.01 0.045 -.2218822 -.0025711 lwage3 | .6417917 .4842304 1.33 0.185 -.3072823 1.590866 union3 | -1.191349 .5168951 -2.30 0.021 -2.204445 -.1782536 Alpha | 1 1.11e-16 9.0e+15 0.000 1 1 E4 | 1 1.85e-15 5.4e+14 0.000 1 1 _cons | 36.03653 2.988439 12.06 0.000 30.1793 41.89376 ----------------+---------------------------------------------------------------- wks5 | wks4 | .1871266 .0201939 9.27 0.000 .1475473 .2267059 ed | -.1122267 .0559477 -2.01 0.045 -.2218822 -.0025711 lwage4 | .6417917 .4842304 1.33 0.185 -.3072823 1.590866 union4 | -1.191349 .5168951 -2.30 0.021 -2.204445 -.1782536 Alpha | 1 4.51e-16 2.2e+15 0.000 1 1 E5 | 1 9.58e-16 1.0e+15 0.000 1 1 _cons | 35.71915 3.03504 11.77 0.000 29.77058 41.66772 ----------------+---------------------------------------------------------------- wks6 | wks5 | .1871266 .0201939 9.27 0.000 .1475473 .2267059 ed | -.1122267 .0559477 -2.01 0.045 -.2218822 -.0025711 lwage5 | .6417917 .4842304 1.33 0.185 -.3072823 1.590866 union5 | -1.191349 .5168951 -2.30 0.021 -2.204445 -.1782536 Alpha | 1 1.47e-15 6.8e+14 0.000 1 1 E6 | 1 3.07e-16 3.3e+15 0.000 1 1 _cons | 35.46429 3.073924 11.54 0.000 29.43951 41.48908 ----------------+---------------------------------------------------------------- wks7 | wks6 | .1871266 .0201939 9.27 0.000 .1475473 .2267059 ed | -.1122267 .0559477 -2.01 0.045 -.2218822 -.0025711 lwage6 | .6417917 .4842304 1.33 0.185 -.3072823 1.590866 union6 | -1.191349 .5168951 -2.30 0.021 -2.204445 -.1782536 Alpha | 1 (constrained) _cons | 35.17658 3.107714 11.32 0.000 29.08557 41.26759 ------------------+---------------------------------------------------------------- mean(wks1)| 46.28067 .2561475 180.68 0.000 45.77863 46.78271 mean(lwage1)| 6.375174 .0159105 400.69 0.000 6.34399 6.406357 mean(union1)| .3613446 .0196941 18.35 0.000 .3227449 .3999442 mean(ed)| 12.84538 .1142829 112.40 0.000 12.62139 13.06937 mean(lwage2)| 6.465212 .0148568 435.17 0.000 6.436093 6.494331 mean(union2)| .3478992 .0195265 17.82 0.000 .3096279 .3861705 mean(lwage3)| 6.596717 .0182971 360.53 0.000 6.560856 6.632579 mean(union3)| .3697479 .0197753 18.70 0.000 .330989 .4085067 mean(lwage4)| 6.696079 .0180538 370.90 0.000 6.660694 6.731464 mean(union4)| .3731092 .0198254 18.82 0.000 .3342522 .4119662 mean(lwage5)| 6.786454 .0173682 390.74 0.000 6.752413 6.820495 mean(union5)| .3663865 .0197511 18.55 0.000 .3276751 .405098 mean(lwage6)| 6.864045 .0173685 395.20 0.000 6.830003 6.898086 mean(union6)| .3630252 .0196669 18.46 0.000 .3244789 .4015715 ------------------+---------------------------------------------------------------- var(e.wks2)| 0 (constrained) var(e.wks3)| 0 (constrained) var(e.wks4)| 0 (constrained) var(e.wks5)| 0 (constrained) var(e.wks6)| 0 (constrained) var(e.wks7)| 17.84645 1.142007 15.74283 20.23116 var(wks1)| 39.03885 2.263359 34.84552 43.73682 var(lwage1)| .1506206 .0087325 .1344418 .1687464 var(union1)| .2307741 .0133796 .2059857 .2585456 var(ed)| 7.771046 .4505425 6.936323 8.70622 var(lwage2)| .1313316 .0076142 .1172247 .1471361 var(union2)| .226865 .013153 .2024964 .2541661 var(lwage3)| .1991968 .0115488 .1778002 .2231683 var(union3)| .232682 .0134656 .2077316 .2606292 var(lwage4)| .193934 .0112437 .1731028 .2172722 var(union4)| .233862 .0135467 .2087626 .261979 var(lwage5)| .1794842 .010406 .160205 .2010834 var(union5)| .232113 .0134399 .207211 .2600075 var(lwage6)| .1794911 .0104064 .1602112 .2010912 var(union6)| .2301371 .0133299 .2054394 .2578038 var(Alpha)| 4.421822 .5500087 3.46517 5.642584 var(E2)| 18.72352 1.208949 16.49782 21.24948 var(E3)| 14.63031 .9689997 12.84921 16.6583 var(E4)| 11.99506 .8136515 10.5018 13.70066 var(E5)| 16.31439 1.05624 14.37017 18.52167 var(E6)| 16.40029 1.074011 14.42476 18.64637 ------------------+---------------------------------------------------------------- cov(wks1,lwage1)| .3160146 .100251 3.15 0.002 .1195263 .5125028 cov(wks1,union1)| -.4005795 .1241414 -3.23 0.001 -.6438922 -.1572669 cov(wks1,ed)| .0669267 .7140568 0.09 0.925 -1.332599 1.466452 cov(wks1,lwage2)| .2564583 .0934205 2.75 0.006 .0733576 .4395591 cov(wks1,union2)| -.4489066 .123384 -3.64 0.000 -.6907349 -.2070784 cov(wks1,lwage3)| .3639027 .1152915 3.16 0.002 .1379355 .5898699 cov(wks1,union3)| -.5946637 .1258618 -4.72 0.000 -.8413483 -.347979 cov(wks1,lwage4)| .3591897 .113759 3.16 0.002 .1362262 .5821533 cov(wks1,union4)| -.5523479 .1259304 -4.39 0.000 -.799167 -.3055288 cov(wks1,lwage5)| .3079745 .1092502 2.82 0.005 .093848 .5221009 cov(wks1,union5)| -.5858495 .125722 -4.66 0.000 -.8322601 -.3394389 cov(wks1,lwage6)| .2700052 .1090834 2.48 0.013 .0562058 .4838047 cov(wks1,union6)| -.4554516 .1243503 -3.66 0.000 -.6991738 -.2117294 cov(wks1,Alpha)| 3.987212 .810524 4.92 0.000 2.398614 5.575809 cov(lwage1,union1)| .0115421 .0076578 1.51 0.132 -.003467 .0265513 cov(lwage1,ed)| .4263676 .047673 8.94 0.000 .3329302 .5198049 cov(lwage1,lwage2)| .1324663 .0079207 16.72 0.000 .1169421 .1479904 cov(lwage1,union2)| .0103209 .00759 1.36 0.174 -.0045552 .025197 cov(lwage1,lwage3)| .1488582 .009363 15.90 0.000 .1305069 .1672094 cov(lwage1,union3)| .0060017 .0076721 0.78 0.434 -.0090352 .0210387 cov(lwage1,lwage4)| .1446782 .00918 15.76 0.000 .1266857 .1626707 cov(lwage1,union4)| .0035012 .0076918 0.46 0.649 -.0115744 .0185768 cov(lwage1,lwage5)| .1400465 .0088543 15.82 0.000 .1226925 .1574006 cov(lwage1,union5)| .0001806 .0076592 0.02 0.981 -.0148312 .0151923 cov(lwage1,lwage6)| .1342125 .0087012 15.42 0.000 .1171585 .1512665 cov(lwage1,union6)| .0028049 .0076309 0.37 0.713 -.0121513 .0177611 cov(lwage1,Alpha)| -.000379 .0684582 -0.01 0.996 -.1345547 .1337966 cov(union1,ed)| -.3794217 .0570612 -6.65 0.000 -.4912597 -.2675837 cov(union1,lwage2)| .0145458 .0071619 2.03 0.042 .0005087 .0285829 cov(union1,union2)| .2104225 .0127439 16.51 0.000 .185445 .2354001 cov(union1,lwage3)| -.0014845 .0087899 -0.17 0.866 -.0187124 .0157435 cov(union1,union3)| .1992298 .0125215 15.91 0.000 .1746882 .2237715 cov(union1,lwage4)| -.0062153 .0086766 -0.72 0.474 -.023221 .0107905 cov(union1,union4)| .2013664 .0125987 15.98 0.000 .1766734 .2260594 cov(union1,lwage5)| -.0028476 .0083443 -0.34 0.733 -.0192021 .0135069 cov(union1,union5)| .1903736 .0122768 15.51 0.000 .1663115 .2144356 cov(union1,lwage6)| -.0008375 .0083437 -0.10 0.920 -.0171909 .0155159 cov(union1,union6)| .1879982 .0121877 15.43 0.000 .1641107 .2118857 cov(union1,Alpha)| -.1158967 .1094338 -1.06 0.290 -.330383 .0985896 cov(ed,lwage2)| .4218359 .0448813 9.40 0.000 .3338702 .5098016 cov(ed,union2)| -.3462067 .0562532 -6.15 0.000 -.456461 -.2359524 cov(ed,lwage3)| .5264564 .0553844 9.51 0.000 .417905 .6350077 cov(ed,union3)| -.3334974 .0567457 -5.88 0.000 -.444717 -.2222778 cov(ed,lwage4)| .5504311 .0551551 9.98 0.000 .4423292 .6585331 cov(ed,union4)| -.3844316 .0574486 -6.69 0.000 -.4970289 -.2718343 cov(ed,lwage5)| .5402914 .0532426 10.15 0.000 .4359378 .6446449 cov(ed,union5)| -.348203 .0568412 -6.13 0.000 -.4596097 -.2367962 cov(ed,lwage6)| .5240142 .0529693 9.89 0.000 .4201963 .6278321 cov(ed,union6)| -.3697899 .0568715 -6.50 0.000 -.4812561 -.2583238 cov(lwage2,union2)| .0128665 .007096 1.81 0.070 -.0010414 .0267744 cov(lwage2,lwage3)| .1401844 .0087747 15.98 0.000 .1229863 .1573825 cov(lwage2,union3)| .0081787 .0071679 1.14 0.254 -.0058701 .0222275 cov(lwage2,lwage4)| .1379009 .0086468 15.95 0.000 .1209535 .1548482 cov(lwage2,union4)| .006576 .007186 0.92 0.360 -.0075083 .0206604 cov(lwage2,lwage5)| .1338986 .0083516 16.03 0.000 .1175298 .1502674 cov(lwage2,union5)| .0049745 .0071539 0.70 0.487 -.0090469 .0189959 cov(lwage2,lwage6)| .1281618 .008199 15.63 0.000 .1120921 .1442316 cov(lwage2,union6)| .0064767 .0071286 0.91 0.364 -.0074951 .0204486 cov(lwage2,Alpha)| .000544 .0642146 0.01 0.993 -.1253144 .1264024 cov(union2,lwage3)| -.0021053 .0087154 -0.24 0.809 -.0191871 .0149766 cov(union2,union3)| .205576 .0126325 16.27 0.000 .1808166 .2303353 cov(union2,lwage4)| -.0066879 .0086034 -0.78 0.437 -.0235503 .0101745 cov(union2,union4)| .2045168 .0126238 16.20 0.000 .1797745 .2292591 cov(union2,lwage5)| -.0024133 .0082731 -0.29 0.771 -.0186283 .0138017 cov(union2,union5)| .1966559 .0123817 15.88 0.000 .1723882 .2209237 cov(union2,lwage6)| .0020342 .0082731 0.25 0.806 -.0141807 .0182492 cov(union2,union6)| .194182 .0122899 15.80 0.000 .1700942 .2182698 cov(union2,Alpha)| -.1059085 .1120146 -0.95 0.344 -.3254531 .1136361 cov(lwage3,union3)| -.0037036 .0088192 -0.42 0.675 -.0209889 .0135817 cov(lwage3,lwage4)| .1766896 .0108349 16.31 0.000 .1554536 .1979256 cov(lwage3,union4)| -.0063626 .0088464 -0.72 0.472 -.0237011 .010976 cov(lwage3,lwage5)| .1670231 .0103428 16.15 0.000 .1467516 .1872946 cov(lwage3,union5)| -.0076784 .0088104 -0.87 0.383 -.0249464 .0095895 cov(lwage3,lwage6)| .1616883 .0101994 15.85 0.000 .1416978 .1816788 cov(lwage3,union6)| -.0075153 .0087767 -0.86 0.392 -.0247173 .0096866 cov(lwage3,Alpha)| .025391 .0785006 0.32 0.746 -.1284674 .1792494 cov(union3,lwage4)| -.0067806 .0087075 -0.78 0.436 -.023847 .0102858 cov(union3,union4)| .2114735 .0128888 16.41 0.000 .1862118 .2367351 cov(union3,lwage5)| -.0039441 .0083725 -0.47 0.638 -.0203539 .0124657 cov(union3,union5)| .2021531 .0126037 16.04 0.000 .1774503 .2268558 cov(union3,lwage6)| .0036388 .0083746 0.43 0.664 -.012775 .0200527 cov(union3,union6)| .1976266 .0124618 15.86 0.000 .1732019 .2220513 cov(union3,Alpha)| -.0744945 .1153352 -0.65 0.518 -.3005473 .1515583 cov(union3,E2)| -.0998415 .0416343 -2.40 0.016 -.1814432 -.0182398 cov(lwage4,union4)| -.0097286 .0087373 -1.11 0.266 -.0268534 .0073962 cov(lwage4,lwage5)| .1691686 .0103246 16.38 0.000 .1489327 .1894045 cov(lwage4,union5)| -.0101923 .0087022 -1.17 0.242 -.0272484 .0068638 cov(lwage4,lwage6)| .1649833 .0102103 16.16 0.000 .1449715 .1849951 cov(lwage4,union6)| -.009188 .0086678 -1.06 0.289 -.0261766 .0078007 cov(lwage4,Alpha)| .0544772 .0762577 0.71 0.475 -.0949852 .2039396 cov(union4,lwage5)| -.0060207 .0083987 -0.72 0.473 -.0224819 .0104404 cov(union4,union5)| .209512 .0128283 16.33 0.000 .1843691 .234655 cov(union4,lwage6)| .0012983 .0083968 0.15 0.877 -.0151592 .0177558 cov(union4,union6)| .206845 .0127315 16.25 0.000 .1818918 .2317983 cov(union4,Alpha)| -.072572 .1163971 -0.62 0.533 -.3007061 .1555621 cov(union4,E2)| -.0776058 .0434437 -1.79 0.074 -.162754 .0075423 cov(union4,E3)| .0216792 .0332502 0.65 0.514 -.0434899 .0868483 cov(lwage5,union5)| -.0075831 .0083658 -0.91 0.365 -.0239797 .0088135 cov(lwage5,lwage6)| .1664088 .0100342 16.58 0.000 .1467422 .1860754 cov(lwage5,union6)| -.0063176 .0083334 -0.76 0.448 -.0226508 .0100156 cov(lwage5,Alpha)| .0285801 .0733716 0.39 0.697 -.1152255 .1723857 cov(union5,lwage6)| -.0017817 .0083622 -0.21 0.831 -.0181714 .0146079 cov(union5,union6)| .214261 .0129068 16.60 0.000 .1889642 .2395579 cov(union5,Alpha)| -.0937751 .1200463 -0.78 0.435 -.3290615 .1415113 cov(union5,E2)| -.115434 .0542063 -2.13 0.033 -.2216764 -.0091916 cov(union5,E3)| .0008031 .0428349 0.02 0.985 -.0831517 .0847579 cov(union5,E4)| -.0241644 .0359833 -0.67 0.502 -.0946903 .0463615 cov(lwage6,union6)| -.0001819 .0083308 -0.02 0.983 -.01651 .0161463 cov(lwage6,Alpha)| .0338496 .0728027 0.46 0.642 -.1088411 .1765403 cov(union6,Alpha)| -.0833283 .120406 -0.69 0.489 -.3193198 .1526631 cov(union6,E2)| -.0673191 .0573881 -1.17 0.241 -.1797977 .0451595 cov(union6,E3)| -.0039584 .0475232 -0.08 0.934 -.0971022 .0891854 cov(union6,E4)| .0198614 .0397131 0.50 0.617 -.0579748 .0976976 cov(union6,E5)| .0445874 .0347706 1.28 0.200 -.0235618 .1127366 ----------------------------------------------------------------------------------- LR test of model vs. saturated: chi2(71) = 110.23, Prob > chi2 = 0.0020 . . * Section 2 part 3: Equivalent xtdpdml code . use https://www3.nd.edu/~rwilliam/statafiles/wages, clear . xtset id t panel variable: id (strongly balanced) time variable: t, 1 to 7 delta: 1 unit . xtdpdml wks L.lwage, inv(ed) pre(L.union) Highlights: Dynamic Panel Data Model using ML for outcome variable wks ------------------------------------------------------------------------------ | OIM wks | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- wks | wks | L1. | .1871266 .0201939 9.27 0.000 .1475473 .2267059 | lwage | L1. | .6417917 .4842304 1.33 0.185 -.3072823 1.590866 | union | L1. | -1.191349 .5168951 -2.30 0.021 -2.204445 -.1782536 | ed | -.1122267 .0559477 -2.01 0.045 -.2218822 -.0025711 ------------------------------------------------------------------------------ # of units = 595. # of periods = 7. First dependent variable is from period 2. Constants are free to vary across time periods LR test of model vs. saturated: chi2(71) = 110.23, Prob > chi2 = 0.0020 IC Measures: BIC = 25470.43 AIC = 24772.64 Wald test of all coeff = 0: chi2(4) = 90.09, Prob > chi2 = 0.0000 . . ******************************************************* . . *** Section 4.1 -- Comparisons with AB, real data, using fiml and listwise . use https://www3.nd.edu/~rwilliam/statafiles/bollenbrand, clear (Bollen & Brand 2010 Social Forces V 89(1) NLSY 1983-1993 Odd years Long format) . set matsize 7500 . xtabond lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break black hisp note: black dropped from div() because of collinearity note: hisp dropped from div() because of collinearity Arellano-Bond dynamic panel-data estimation Number of obs = 8,915 Group variable: id Number of groups = 3,488 Time variable: year Obs per group: min = 1 avg = 2.555906 max = 4 Number of instruments = 21 Wald chi2(11) = 3315.32 Prob > chi2 = 0.0000 One-step results ------------------------------------------------------------------------------ lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg | L1. | -.0072789 .0402023 -0.18 0.856 -.086074 .0715163 | hchild | -.0091342 .0090602 -1.01 0.313 -.0268919 .0086236 marr | .0468352 .0168387 2.78 0.005 .0138321 .0798384 div | .0747365 .0225606 3.31 0.001 .0305184 .1189545 eduatt | .0575892 .0102432 5.62 0.000 .0375128 .0776656 cursc | -.081103 .0153101 -5.30 0.000 -.1111103 -.0510956 snrpt | .0132922 .0054544 2.44 0.015 .0026018 .0239826 snrft | .0140817 .0027054 5.21 0.000 .0087792 .0193842 exppt | .056597 .0055597 10.18 0.000 .0457002 .0674937 expft | .0608082 .004636 13.12 0.000 .0517219 .0698946 break | .0200741 .0069791 2.88 0.004 .0063953 .0337528 black | 0 (omitted) hisp | 0 (omitted) _cons | .6280031 .1360759 4.62 0.000 .3612993 .894707 ------------------------------------------------------------------------------ Instruments for differenced equation GMM-type: L(2/.).lnwg Standard: D.hchild D.marr D.div D.eduatt D.cursc D.snrpt D.snrft D.exppt D.expft D.break Instruments for level equation Standard: _cons . estimates store gmm . * FIML . xtdpdml lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break , /// > constinv errorinv fiml tfix store(fiml) /// > inv(black hisp) ti(Adapted from Bollen & Brand Social Forces 2010) Highlights: Adapted from Bollen & Brand Social Forces 2010 ------------------------------------------------------------------------------ | OIM lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg | lnwg | L1. | .3378925 .0124879 27.06 0.000 .3134166 .3623684 | hchild | -.0209521 .0063606 -3.29 0.001 -.0334186 -.0084856 marr | .0359839 .012841 2.80 0.005 .0108161 .0611517 div | .0617287 .017081 3.61 0.000 .0282505 .095207 eduatt | .0583252 .0072068 8.09 0.000 .0442001 .0724503 cursc | -.1075845 .0132218 -8.14 0.000 -.1334988 -.0816701 snrpt | .0088462 .0043731 2.02 0.043 .0002751 .0174173 snrft | .0174143 .0021041 8.28 0.000 .0132904 .0215383 exppt | .0308717 .0037348 8.27 0.000 .0235517 .0381917 expft | .0307015 .0022474 13.66 0.000 .0262966 .0351064 break | .0370938 .0043345 8.56 0.000 .0285983 .0455893 black | -.0074612 .0103375 -0.72 0.470 -.0277223 .0127999 hisp | .0730661 .012675 5.76 0.000 .0482236 .0979086 ------------------------------------------------------------------------------ # of units = 5285. # of periods = 6. First dependent variable is from period 2. Constants are invariant across time periods LR test of model vs. saturated: chi2(218) = 831.04, Prob > chi2 = 0.0000 IC Measures: BIC = 345115.17 AIC = 334921.02 Wald test of all coeff = 0: chi2(13) = 6701.90, Prob > chi2 = 0.0000 . * Listwise deletion used instead of fiml . xtdpdml lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break , /// > constinv errorinv tfix store(normal) /// > inv(black hisp) gof Highlights: Dynamic Panel Data Model using ML for outcome variable lnwg ------------------------------------------------------------------------------ | OIM lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg | lnwg | L1. | .2776779 .0171863 16.16 0.000 .2439933 .3113624 | hchild | -.0144888 .0099824 -1.45 0.147 -.034054 .0050765 marr | .0590624 .0186809 3.16 0.002 .0224486 .0956763 div | .0577631 .0253645 2.28 0.023 .0080495 .1074767 eduatt | .0763836 .0108579 7.03 0.000 .0551024 .0976647 cursc | -.0923283 .0191093 -4.83 0.000 -.1297819 -.0548747 snrpt | .0150824 .0059555 2.53 0.011 .0034099 .0267549 snrft | .0101602 .0027619 3.68 0.000 .004747 .0155734 exppt | .04097 .0054855 7.47 0.000 .0302186 .0517215 expft | .0379746 .0030576 12.42 0.000 .0319817 .0439675 break | .0195759 .0075289 2.60 0.009 .0048195 .0343322 black | -.0299847 .017994 -1.67 0.096 -.0652523 .0052829 hisp | .0737694 .0220227 3.35 0.001 .0306056 .1169332 ------------------------------------------------------------------------------ # of units = 1229. # of periods = 6. First dependent variable is from period 2. Constants are invariant across time periods LR test of model vs. saturated: chi2(218) = 612.60, Prob > chi2 = 0.0000 IC Measures: BIC = 113801.75 AIC = 105870.00 Wald test of all coeff = 0: chi2(13) = 3171.73, Prob > chi2 = 0.0000 ---------------------------------------------------------------------------- Fit statistic | Value Description ---------------------+------------------------------------------------------ Likelihood ratio | chi2_ms(218) | 612.598 model vs. saturated p > chi2 | 0.000 chi2_bs(275) | 4218.653 baseline vs. saturated p > chi2 | 0.000 ---------------------+------------------------------------------------------ Population error | RMSEA | 0.038 Root mean squared error of approximation 90% CI, lower bound | 0.035 upper bound | 0.042 pclose | 1.000 Probability RMSEA <= 0.05 ---------------------+------------------------------------------------------ Information criteria | AIC | 105870.003 Akaike's information criterion BIC | 113801.749 Bayesian information criterion ---------------------+------------------------------------------------------ Baseline comparison | CFI | 0.900 Comparative fit index TLI | 0.874 Tucker-Lewis index ---------------------+------------------------------------------------------ Size of residuals | SRMR | 0.014 Standardized root mean squared residual CD | 0.818 Coefficient of determination ---------------------------------------------------------------------------- . ******************************************************* . . . *** Section 4.2. Panel Model with fixed effects; Goodness of Fit measures. . * Bollen & Brand Social Forces 2010 Fixed Effects Table 3 Model 2 p. 15 . use https://www3.nd.edu/~rwilliam/statafiles/bollenbrand, clear (Bollen & Brand 2010 Social Forces V 89(1) NLSY 1983-1993 Odd years Long format) . xtdpdml lnwg hchild marr div, ylag(0) fiml tfix errorinv gof sto(baseline) Highlights: Dynamic Panel Data Model using ML for outcome variable lnwg ------------------------------------------------------------------------------ | OIM lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg | hchild | -.0704949 .0055935 -12.60 0.000 -.081458 -.0595319 marr | .0826099 .0104827 7.88 0.000 .0620642 .1031556 div | .0572981 .014612 3.92 0.000 .0286591 .0859372 ------------------------------------------------------------------------------ # of units = 5231. # of periods = 6. First dependent variable is from period 1. Constants are free to vary across time periods LR test of model vs. saturated: chi2(106) = 1940.93, Prob > chi2 = 0.0000 IC Measures: BIC = 73683.21 AIC = 72252.61 Wald test of all coeff = 0: chi2(3) = 204.34, Prob > chi2 = 0.0000 ---------------------------------------------------------------------------- Fit statistic | Value Description ---------------------+------------------------------------------------------ Likelihood ratio | chi2_ms(106) | 1940.932 model vs. saturated p > chi2 | 0.000 chi2_bs(123) | 8307.362 baseline vs. saturated p > chi2 | 0.000 ---------------------+------------------------------------------------------ Population error | RMSEA | 0.058 Root mean squared error of approximation 90% CI, lower bound | 0.055 upper bound | 0.060 pclose | 0.000 Probability RMSEA <= 0.05 ---------------------+------------------------------------------------------ Information criteria | AIC | 72252.615 Akaike's information criterion BIC | 73683.209 Bayesian information criterion ---------------------+------------------------------------------------------ Baseline comparison | CFI | 0.776 Comparative fit index TLI | 0.740 Tucker-Lewis index ---------------------+------------------------------------------------------ Size of residuals | CD | 0.870 Coefficient of determination ---------------------------------------------------------------------------- Note: SRMR is not reported because of missing values. . estat scoretests Score tests for linear constraints ( 1) [lnwg1]hchild1 - [lnwg6]hchild6 = 0 ( 2) [lnwg1]marr1 - [lnwg6]marr6 = 0 ( 3) [lnwg1]div1 - [lnwg6]div6 = 0 ( 4) [lnwg1]Alpha = 1 ( 5) [lnwg2]hchild2 - [lnwg6]hchild6 = 0 ( 6) [lnwg2]marr2 - [lnwg6]marr6 = 0 ( 7) [lnwg2]div2 - [lnwg6]div6 = 0 ( 8) [lnwg2]Alpha = 1 (12) [lnwg3]Alpha = 1 (13) [lnwg4]hchild4 - [lnwg6]hchild6 = 0 (15) [lnwg4]div4 - [lnwg6]div6 = 0 (16) [lnwg4]Alpha = 1 (17) [lnwg5]hchild5 - [lnwg6]hchild6 = 0 (20) [lnwg5]Alpha = 1 (21) [lnwg6]Alpha = 1 (22) [var(e.lnwg1)]_cons - [var(e.lnwg6)]_cons = 0 (23) [var(e.lnwg2)]_cons - [var(e.lnwg6)]_cons = 0 (24) [var(e.lnwg3)]_cons - [var(e.lnwg6)]_cons = 0 --------------------------------------- | chi2 df P>chi2 -------------+------------------------- ( 1) | 54.652 1 0.00 ( 2) | 17.970 1 0.00 ( 3) | 4.194 1 0.04 ( 4) | 543.286 1 0.00 ( 5) | 15.011 1 0.00 ( 6) | 5.726 1 0.02 ( 7) | 8.885 1 0.00 ( 8) | 91.101 1 0.00 (12) | 5.594 1 0.02 (13) | 5.866 1 0.02 (15) | 4.213 1 0.04 (16) | 98.223 1 0.00 (17) | 4.062 1 0.04 (20) | 100.611 1 0.00 (21) | 134.406 1 0.00 (22) | 12.887 1 0.00 (23) | 20.007 1 0.00 (24) | 20.581 1 0.00 --------------------------------------- . xtdpdml lnwg hchild marr div, ylag(0) fiml tfix alphafree gof sto(modified) Highlights: Dynamic Panel Data Model using ML for outcome variable lnwg ------------------------------------------------------------------------------ | OIM lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg1 | hchild1 | -.0454728 .0057856 -7.86 0.000 -.0568123 -.0341333 marr1 | .0797247 .009589 8.31 0.000 .0609307 .0985187 div1 | .0832361 .0137613 6.05 0.000 .0562644 .1102077 Alpha | .1708657 .0074718 22.87 0.000 .1562213 .1855101 _cons | 1.447643 .0079112 182.99 0.000 1.432138 1.463149 -------------+---------------------------------------------------------------- lnwg2 | hchild2 | -.0454728 .0057856 -7.86 0.000 -.0568123 -.0341333 marr2 | .0797247 .009589 8.31 0.000 .0609307 .0985187 div2 | .0832361 .0137613 6.05 0.000 .0562644 .1102077 Alpha | .2681447 .0076074 35.25 0.000 .2532344 .283055 _cons | 1.578101 .0091664 172.16 0.000 1.560135 1.596066 -------------+---------------------------------------------------------------- lnwg3 | hchild3 | -.0454728 .0057856 -7.86 0.000 -.0568123 -.0341333 marr3 | .0797247 .009589 8.31 0.000 .0609307 .0985187 div3 | .0832361 .0137613 6.05 0.000 .0562644 .1102077 Alpha | .3639098 .0079533 45.76 0.000 .3483216 .379498 _cons | 1.757548 .0108094 162.59 0.000 1.736362 1.778734 -------------+---------------------------------------------------------------- lnwg4 | hchild4 | -.0454728 .0057856 -7.86 0.000 -.0568123 -.0341333 marr4 | .0797247 .009589 8.31 0.000 .0609307 .0985187 div4 | .0832361 .0137613 6.05 0.000 .0562644 .1102077 Alpha | .4375873 .0080093 54.64 0.000 .4218895 .4532852 _cons | 1.903469 .0120554 157.89 0.000 1.879841 1.927097 -------------+---------------------------------------------------------------- lnwg5 | hchild5 | -.0454728 .0057856 -7.86 0.000 -.0568123 -.0341333 marr5 | .0797247 .009589 8.31 0.000 .0609307 .0985187 div5 | .0832361 .0137613 6.05 0.000 .0562644 .1102077 Alpha | .4536069 .0084931 53.41 0.000 .4369608 .4702531 _cons | 2.040655 .0130707 156.12 0.000 2.015037 2.066273 -------------+---------------------------------------------------------------- lnwg6 | hchild6 | -.0454728 .0057856 -7.86 0.000 -.0568123 -.0341333 marr6 | .0797247 .009589 8.31 0.000 .0609307 .0985187 div6 | .0832361 .0137613 6.05 0.000 .0562644 .1102077 Alpha | .4558276 .0090773 50.22 0.000 .4380364 .4736187 _cons | 2.12327 .0139428 152.28 0.000 2.095943 2.150598 ------------------------------------------------------------------------------ # of units = 5231. # of periods = 6. First dependent variable is from period 1. Constants are free to vary across time periods LR test of model vs. saturated: chi2(96) = 789.25, Prob > chi2 = 0.0000 IC Measures: BIC = 72617.15 AIC = 71120.93 Wald test of all coeff = 0: chi2(9) = 6692.34, Prob > chi2 = 0.0000 ---------------------------------------------------------------------------- Fit statistic | Value Description ---------------------+------------------------------------------------------ Likelihood ratio | chi2_ms(96) | 789.252 model vs. saturated p > chi2 | 0.000 chi2_bs(123) | 8307.362 baseline vs. saturated p > chi2 | 0.000 ---------------------+------------------------------------------------------ Population error | RMSEA | 0.037 Root mean squared error of approximation 90% CI, lower bound | 0.035 upper bound | 0.040 pclose | 1.000 Probability RMSEA <= 0.05 ---------------------+------------------------------------------------------ Information criteria | AIC | 71120.934 Akaike's information criterion BIC | 72617.152 Bayesian information criterion ---------------------+------------------------------------------------------ Baseline comparison | CFI | 0.915 Comparative fit index TLI | 0.891 Tucker-Lewis index ---------------------+------------------------------------------------------ Size of residuals | CD | 0.899 Coefficient of determination ---------------------------------------------------------------------------- Note: SRMR is not reported because of missing values. . lrtest baseline_f modified_f, stats Likelihood-ratio test LR chi2(10) = 1151.68 (Assumption: baseline_f nested in modified_f) Prob > chi2 = 0.0000 Akaike's information criterion and Bayesian information criterion ----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- baseline_f | 5,231 . -35908.31 218 72252.61 73683.21 modified_f | 5,231 . -35332.47 228 71120.93 72617.15 ----------------------------------------------------------------------------- Note: N=Obs used in calculating BIC; see [R] BIC note. . . . ******************************************************* . . *** 4.3 Fixed Effects vs Random Effects Models; Alternative to the Hausman Test . use https://www3.nd.edu/~rwilliam/statafiles/bollenbrand, clear (Bollen & Brand 2010 Social Forces V 89(1) NLSY 1983-1993 Odd years Long format) . set matsize 7500 . set more off . . * Random effects . xtdpdml lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break , /// > constinv errorinv fiml tfix re store(re) /// > inv(black hisp) ti(Adapted from Bollen & Brand Social Forces 2010) Highlights: Adapted from Bollen & Brand Social Forces 2010 ------------------------------------------------------------------------------ | OIM lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg | lnwg | L1. | .3926206 .0124684 31.49 0.000 .3681829 .4170582 | hchild | -.0115929 .0033626 -3.45 0.001 -.0181835 -.0050023 marr | .0077441 .0081577 0.95 0.342 -.0082447 .0237329 div | .0323365 .0104985 3.08 0.002 .0117598 .0529133 eduatt | .0547151 .0019449 28.13 0.000 .0509033 .058527 cursc | -.0951919 .011509 -8.27 0.000 -.1177491 -.0726347 snrpt | .0072101 .0033014 2.18 0.029 .0007395 .0136808 snrft | .0160494 .0015681 10.24 0.000 .012976 .0191227 exppt | .0195333 .0018887 10.34 0.000 .0158316 .0232351 expft | .0300089 .0015361 19.54 0.000 .0269983 .0330196 break | .0037981 .0018041 2.11 0.035 .0002621 .0073342 black | -.0227355 .0086874 -2.62 0.009 -.0397625 -.0057084 hisp | .0569633 .0100298 5.68 0.000 .0373051 .0766214 ------------------------------------------------------------------------------ # of units = 5285. # of periods = 6. First dependent variable is from period 2. Constants are invariant across time periods LR test of model vs. saturated: chi2(269) = 1375.94, Prob > chi2 = 0.0000 IC Measures: BIC = 345222.87 AIC = 335363.93 Wald test of all coeff = 0: chi2(13) = 12337.47, Prob > chi2 = 0.0000 . . * Fixed effects . xtdpdml lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break , /// > constinv errorinv fiml tfix store(fe) /// > inv(black hisp) ti(Adapted from Bollen & Brand Social Forces 2010) Highlights: Adapted from Bollen & Brand Social Forces 2010 ------------------------------------------------------------------------------ | OIM lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg | lnwg | L1. | .3378925 .0124879 27.06 0.000 .3134166 .3623684 | hchild | -.0209521 .0063606 -3.29 0.001 -.0334186 -.0084856 marr | .0359839 .012841 2.80 0.005 .0108161 .0611517 div | .0617287 .017081 3.61 0.000 .0282505 .095207 eduatt | .0583252 .0072068 8.09 0.000 .0442001 .0724503 cursc | -.1075845 .0132218 -8.14 0.000 -.1334988 -.0816701 snrpt | .0088462 .0043731 2.02 0.043 .0002751 .0174173 snrft | .0174143 .0021041 8.28 0.000 .0132904 .0215383 exppt | .0308717 .0037348 8.27 0.000 .0235517 .0381917 expft | .0307015 .0022474 13.66 0.000 .0262966 .0351064 break | .0370938 .0043345 8.56 0.000 .0285983 .0455893 black | -.0074612 .0103375 -0.72 0.470 -.0277223 .0127999 hisp | .0730661 .012675 5.76 0.000 .0482236 .0979086 ------------------------------------------------------------------------------ # of units = 5285. # of periods = 6. First dependent variable is from period 2. Constants are invariant across time periods LR test of model vs. saturated: chi2(218) = 831.04, Prob > chi2 = 0.0000 IC Measures: BIC = 345115.17 AIC = 334921.02 Wald test of all coeff = 0: chi2(13) = 6701.90, Prob > chi2 = 0.0000 . . esttab re_h fe_h , mtitles(Random Fixed) scalar(chi2_ms df_ms p_ms BIC AIC ) z -------------------------------------------- (1) (2) Random Fixed -------------------------------------------- lnwg L.lnwg 0.393*** 0.338*** (31.49) (27.06) hchild -0.0116*** -0.0210*** (-3.45) (-3.29) marr 0.00774 0.0360** (0.95) (2.80) div 0.0323** 0.0617*** (3.08) (3.61) eduatt 0.0547*** 0.0583*** (28.13) (8.09) cursc -0.0952*** -0.108*** (-8.27) (-8.14) snrpt 0.00721* 0.00885* (2.18) (2.02) snrft 0.0160*** 0.0174*** (10.24) (8.28) exppt 0.0195*** 0.0309*** (10.34) (8.27) expft 0.0300*** 0.0307*** (19.54) (13.66) break 0.00380* 0.0371*** (2.11) (8.56) black -0.0227** -0.00746 (-2.62) (-0.72) hisp 0.0570*** 0.0731*** (5.68) (5.76) -------------------------------------------- N 5285 5285 chi2_ms 1375.9 831.0 df_ms 269 218 p_ms 7.79e-148 2.28e-72 BIC 345222.9 345115.2 AIC 335363.9 334921.0 -------------------------------------------- z statistics in parentheses * p<0.05, ** p<0.01, *** p<0.001 . lrtest re_f fe_f, stats Likelihood-ratio test LR chi2(51) = 544.90 (Assumption: re_f nested in fe_f) Prob > chi2 = 0.0000 Akaike's information criterion and Bayesian information criterion ----------------------------------------------------------------------------- Model | Obs ll(null) ll(model) df AIC BIC -------------+--------------------------------------------------------------- re_f | 5,285 . -166182 1500 335363.9 345222.9 fe_f | 5,285 . -165909.5 1551 334921 345115.2 ----------------------------------------------------------------------------- Note: N=Obs used in calculating BIC; see [R] BIC note. . . . ******************************************************* . . *4.4 Non-Normality . use https://www3.nd.edu/~rwilliam/statafiles/bollenbrand, clear (Bollen & Brand 2010 Social Forces V 89(1) NLSY 1983-1993 Odd years Long format) . set matsize 7500 . * Use vce(sbentler). Coefficients are the same as when listwise is used . * Standard errors and GOF measures change . xtdpdml lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break , /// > constinv errorinv tfix store(sbentler) vce(sbentler) /// > inv(black hisp) gof Highlights: Dynamic Panel Data Model using ML for outcome variable lnwg ------------------------------------------------------------------------------ | Satorra-Bentler lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg | lnwg | L1. | .2776779 .022911 12.12 0.000 .2327732 .3225825 | hchild | -.0144888 .0107164 -1.35 0.176 -.0354925 .006515 marr | .0590624 .0174365 3.39 0.001 .0248875 .0932374 div | .0577631 .0242609 2.38 0.017 .0102126 .1053135 eduatt | .0763836 .0125044 6.11 0.000 .0518754 .1008918 cursc | -.0923283 .0213345 -4.33 0.000 -.1341431 -.0505135 snrpt | .0150824 .0077512 1.95 0.052 -.0001097 .0302744 snrft | .0101602 .0027998 3.63 0.000 .0046728 .0156477 exppt | .04097 .0063855 6.42 0.000 .0284546 .0534854 expft | .0379746 .0030869 12.30 0.000 .0319244 .0440248 break | .0195759 .0077626 2.52 0.012 .0043615 .0347903 black | -.0299847 .0180996 -1.66 0.098 -.0654592 .0054899 hisp | .0737694 .0211553 3.49 0.000 .0323058 .115233 ------------------------------------------------------------------------------ # of units = 1229. # of periods = 6. First dependent variable is from period 2. Constants are invariant across time periods LR test of model vs. saturated: chi2(218) = 612.60, Prob > chi2 = 0.0000 IC Measures: BIC = 113801.75 AIC = 105870.00 Wald test of all coeff = 0: chi2(13) = 3260.22, Prob > chi2 = 0.0000 ---------------------------------------------------------------------------- Fit statistic | Value Description ---------------------+------------------------------------------------------ Likelihood ratio | chi2_ms(218) | 612.598 model vs. saturated p > chi2 | 0.000 chi2_bs(275) | 4218.653 baseline vs. saturated p > chi2 | 0.000 | Satorra-Bentler | chi2sb_ms(218) | 493.948 p > chi2 | 0.000 chi2sb_bs(275) | 3782.809 p > chi2 | 0.000 ---------------------+------------------------------------------------------ Population error | RMSEA | 0.038 Root mean squared error of approximation 90% CI, lower bound | 0.035 upper bound | 0.042 pclose | 1.000 Probability RMSEA <= 0.05 | Satorra-Bentler | RMSEA_SB | 0.032 Root mean squared error of approximation ---------------------+------------------------------------------------------ Information criteria | AIC | 105870.003 Akaike's information criterion BIC | 113801.749 Bayesian information criterion ---------------------+------------------------------------------------------ Baseline comparison | CFI | 0.900 Comparative fit index TLI | 0.874 Tucker-Lewis index | Satorra-Bentler | CFI_SB | 0.921 Comparative fit index TLI_SB | 0.901 Tucker-Lewis index ---------------------+------------------------------------------------------ Size of residuals | SRMR | 0.014 Standardized root mean squared residual CD | 0.818 Coefficient of determination ---------------------------------------------------------------------------- . . * vce(sbentler) does NOT work with fiml . capture noisily xtdpdml lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break , /// > constinv errorinv tfix store(sbentler) vce(sbentler) /// > inv(black hisp) gof fiml vce(sbentler) not allowed with method(mlmv) . * Produces the error message "vce(sbentler) not allowed with method(mlmv)" . . * Now use vce(robust). . * Coefficients stay the same as when listwise is usedbut standard errors change. . * In these particular examples vce(sbentler) and vce(robust) produce very . * similar estimates of the standard errors. . * But, few GOF measures are reported with vce(robust). . xtdpdml lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break , /// > constinv errorinv tfix store(robust) /// > inv(black hisp) vce(robust) gof Highlights: Dynamic Panel Data Model using ML for outcome variable lnwg ------------------------------------------------------------------------------ | Robust lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg | lnwg | L1. | .2776779 .0259668 10.69 0.000 .2267839 .3285718 | hchild | -.0144888 .0105587 -1.37 0.170 -.0351834 .0062059 marr | .0590624 .0183556 3.22 0.001 .023086 .0950388 div | .0577631 .0247255 2.34 0.019 .009302 .1062242 eduatt | .0763836 .0126368 6.04 0.000 .0516158 .1011513 cursc | -.0923283 .0224957 -4.10 0.000 -.1364191 -.0482375 snrpt | .0150824 .007883 1.91 0.056 -.0003679 .0305327 snrft | .0101602 .0028673 3.54 0.000 .0045404 .01578 exppt | .04097 .0062977 6.51 0.000 .0286268 .0533133 expft | .0379746 .0034028 11.16 0.000 .0313052 .0446439 break | .0195759 .0079583 2.46 0.014 .0039779 .0351738 black | -.0299847 .0181631 -1.65 0.099 -.0655838 .0056144 hisp | .0737694 .0216293 3.41 0.001 .0313768 .116162 ------------------------------------------------------------------------------ # of units = 1229. # of periods = 6. First dependent variable is from period 2. Constants are invariant across time periods Warning: LR test of model vs saturated could not be computed IC Measures: BIC = 111738.70 AIC = 105290.00 Wald test of all coeff = 0: chi2(13) = 3372.60, Prob > chi2 = 0.0000 ---------------------------------------------------------------------------- Fit statistic | Value Description ---------------------+------------------------------------------------------ Size of residuals | SRMR | 0.014 Standardized root mean squared residual CD | 0.818 Coefficient of determination ---------------------------------------------------------------------------- Note: model was fit with vce(robust); only stats(residuals) valid. . * vce(robust) does work with fiml . * Coefficients are the same as in example 4.1 using FIML but standard errors differ . xtdpdml lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break , /// > constinv errorinv tfix store(robustfiml) /// > inv(black hisp) vce(robust) gof fiml Highlights: Dynamic Panel Data Model using ML for outcome variable lnwg ------------------------------------------------------------------------------ | Robust lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg | lnwg | L1. | .3378925 .018737 18.03 0.000 .3011687 .3746164 | hchild | -.0209521 .0070931 -2.95 0.003 -.0348543 -.0070499 marr | .0359839 .0127695 2.82 0.005 .0109562 .0610117 div | .0617287 .0169545 3.64 0.000 .0284986 .0949589 eduatt | .0583252 .0076892 7.59 0.000 .0432546 .0733958 cursc | -.1075845 .0145033 -7.42 0.000 -.1360104 -.0791585 snrpt | .0088462 .0053824 1.64 0.100 -.001703 .0193954 snrft | .0174143 .0019984 8.71 0.000 .0134976 .021331 exppt | .0308717 .0042232 7.31 0.000 .0225943 .0391491 expft | .0307015 .0025553 12.01 0.000 .0256932 .0357098 break | .0370938 .0045735 8.11 0.000 .0281299 .0460577 black | -.0074612 .0099577 -0.75 0.454 -.026978 .0120556 hisp | .0730661 .0128495 5.69 0.000 .0478816 .0982506 ------------------------------------------------------------------------------ # of units = 5285. # of periods = 6. First dependent variable is from period 2. Constants are invariant across time periods Warning: LR test of model vs saturated could not be computed IC Measures: BIC = 345089.45 AIC = 334915.02 Wald test of all coeff = 0: chi2(13) = 7480.13, Prob > chi2 = 0.0000 ---------------------------------------------------------------------------- Fit statistic | Value Description ---------------------+------------------------------------------------------ Size of residuals | CD | 0.812 Coefficient of determination ---------------------------------------------------------------------------- Note: model was fit with vce(robust); only stats(residuals) valid. Note: SRMR is not reported because of missing values. . . * Now use method(adf). Both coefficients and standard errors change. . * But, won't converge for this example . xtdpdml lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break , /// > constinv errorinv tfix store(adf) /// > inv(black hisp) method(adf) gof Highlights: Dynamic Panel Data Model using ML for outcome variable lnwg ------------------------------------------------------------------------------ | . lnwg | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- lnwg | lnwg | L1. | .3359564 .1403161 2.39 0.017 .0609418 .6109709 | hchild | -.0317068 .0278349 -1.14 0.255 -.0862621 .0228485 marr | .4189297 .2529076 1.66 0.098 -.0767601 .9146195 div | -.0014094 .0029452 -0.48 0.632 -.0071818 .004363 eduatt | .07422 .0452271 1.64 0.101 -.0144236 .1628635 cursc | -.0003702 .0021759 -0.17 0.865 -.0046349 .0038945 snrpt | .023188 .0160693 1.44 0.149 -.0083073 .0546832 snrft | .0109731 .0052475 2.09 0.037 .0006882 .0212581 exppt | .0153608 .0164117 0.94 0.349 -.0168056 .0475272 expft | .0259677 .0073841 3.52 0.000 .0114951 .0404403 break | .0602219 .0154706 3.89 0.000 .0299001 .0905437 black | -.062941 .2993155 -0.21 0.833 -.6495887 .5237066 hisp | .0538406 .2450848 0.22 0.826 -.4265168 .5341979 ------------------------------------------------------------------------------ # of units = 1229. # of periods = 6. First dependent variable is from period 2. Constants are invariant across time periods Warning: LR test of model vs saturated could not be computed Warning: IC Measures BIC and AIC could not be computed Wald test of all coeff = 0: chi2(13) = 86527.74, Prob > chi2 = 0.0000 Warning! Convergence not achieved ---------------------------------------------------------------------------- Fit statistic | Value Description ---------------------+------------------------------------------------------ Discrepancy | chi2_ms(.) | . model vs. saturated p > chi2 | . chi2_bs(275) | 1326.169 baseline vs. saturated p > chi2 | 0.000 ---------------------+------------------------------------------------------ Population error | RMSEA | . Root mean squared error of approximation 90% CI, lower bound | 0.000 upper bound | . pclose | . Probability RMSEA <= 0.05 ---------------------+------------------------------------------------------ Baseline comparison | CFI | 1.000 Comparative fit index TLI | . Tucker-Lewis index ---------------------+------------------------------------------------------ Size of residuals | SRMR | 69059.811 Standardized root mean squared residual CD | 0.886 Coefficient of determination ---------------------------------------------------------------------------- . * Also fiml will NOT work with adf . capture noisily xtdpdml lnwg hchild marr div eduatt cursc snrpt snrft exppt expft break , /// > constinv errorinv tfix store(adf2) /// > inv(black hisp) method(adf) gof fiml You cannot specify both fiml and method(adf) Job is terminating. . * Produces the error message "You cannot specify both fiml and method(adf)" . end of do-file . exit, clear