{smcl} {com}{sf}{ul off}{txt}{.-} log: {res}C:\Documents and Settings\jlee\My Documents\EC671\xtprobit_logit.smcl {txt}log type: {res}smcl {txt}opened on: {res} 2 Nov 2004, 23:08:58 {txt} {com}. . use union.dta, clear {txt}(NLS Women 14-24 in 1968) {com}. *use http://www.stata-press.com/data/r8/union, clear . . iis idcode {txt} {com}. tis year {txt} {com}. . ** random-effects probit model . xtprobit union age grade not_smsa south southXt, re {txt}Fitting comparison model: Iteration 0: log likelihood = {res} -13864.23 {txt}Iteration 1: log likelihood = {res}-13548.436 {txt}Iteration 2: log likelihood = {res}-13547.308 {txt}Iteration 3: log likelihood = {res}-13547.308 {txt}Fitting full model: rho = {res} 0.0 {txt}log likelihood = {res}-13547.308 {txt}rho = {res} 0.1 {txt}log likelihood = {res}-12239.207 {txt}rho = {res} 0.2 {txt}log likelihood = {res}-11591.449 {txt}rho = {res} 0.3 {txt}log likelihood = {res}-11212.156 {txt}rho = {res} 0.4 {txt}log likelihood = {res}-10982.152 {txt}rho = {res} 0.5 {txt}log likelihood = {res}-10853.488 {txt}rho = {res} 0.6 {txt}log likelihood = {res}-10809.372 {txt}rho = {res} 0.7 {txt}log likelihood = {res} -10866.13 {txt}Iteration 0: log likelihood = {res}-10809.372 {txt}Iteration 1: log likelihood = {res}-10595.191 {txt}Iteration 2: log likelihood = {res}-10561.107 {txt}Iteration 3: log likelihood = {res}-10561.065 {txt}Iteration 4: log likelihood = {res}-10561.065 {txt}Random-effects probit regression Number of obs = {res} 26200 {txt}Group variable (i): {res}idcode {txt}Number of groups = {res} 4434 {txt}Random effects u_i ~ {res}Gaussian {txt}Obs per group: min = {res} 1 {txt}avg = {res} 5.9 {txt}max = {res} 12 {txt}Wald chi2({res}5{txt}) = {res} 218.90 {txt}Log likelihood = {res}-10561.065 {txt}Prob > chi2 = {res}0.0000 {txt}{hline 13}{c TT}{hline 64} union {c |} Coef. Std. Err. z P>|z| [95% Conf. Interval] {hline 13}{c +}{hline 64} age {c |} {res} .0044483 .0025027 1.78 0.076 -.000457 .0093535 {txt}grade {c |} {res} .0482482 .0100413 4.80 0.000 .0285677 .0679287 {txt}not_smsa {c |} {res}-.1370699 .0462961 -2.96 0.003 -.2278087 -.0463312 {txt}south {c |} {res}-.6305824 .0614827 -10.26 0.000 -.7510863 -.5100785 {txt}southXt {c |} {res} .0131853 .0043819 3.01 0.003 .004597 .0217737 {txt}_cons {c |} {res}-1.846838 .1458222 -12.67 0.000 -2.132644 -1.561032 {txt}{hline 13}{c +}{hline 64} /lnsig2u {c |} {res} .5612193 .0431875{col 58} .4765733 .6458653 {txt}{hline 13}{c +}{hline 64} sigma_u {c |} {res} 1.323937 .0285888{col 58} 1.269073 1.381172 {txt}rho {c |} {res} .6367346 .0099894{col 58} .6169384 .6560781 {txt}{hline 13}{c BT}{hline 64} Likelihood-ratio test of rho=0: {help j_chibar:chibar2(01) = }{res} 5972.49{txt} Prob >= chibar2 = {res}0.000 {txt} {com}. mfx compute {txt}Marginal effects after xtprobit y = Linear prediction (predict) = {res}-1.3427475 {txt}{hline 9}{c TT}{hline 68} variable {c |}{col 17}dy/dx{col 26}Std. Err.{col 40}z{col 45}P>|z|{col 52}[ 95% C.I. ]{col 75}X {hline 9}{c +}{hline 68} age {c |} {res} .0044483 .0025 1.78 0.076 -.000457 .009354 30.4322 {txt}grade {c |} {res} .0482482 .01004 4.80 0.000 .028568 .067929 12.7615 {txt}not_smsa*{c |} {res}-.1370699 .0463 -2.96 0.003 -.227809 -.046331 .283702 {txt}south*{c |} {res}-.6305824 .06148 -10.26 0.000 -.751086 -.510079 .413015 {txt}southXt {c |} {res} .0131853 .00438 3.01 0.003 .004597 .021774 3.96874 {txt}{hline 9}{c BT}{hline 68} (*) dy/dx is for discrete change of dummy variable from 0 to 1 {com}. . quadchk {txt}Refitting model quad() = {res} 8 {txt}Iteration 0: log likelihood = {res}-10576.986 {txt}Iteration 1: log likelihood = {res}-10574.784 {txt}Iteration 2: log likelihood = {res} -10574.78 {txt}Random-effects probit regression Number of obs = {res} 26200 {txt}Group variable (i): {res}idcode {txt}Number of groups = {res} 4434 {txt}Random effects u_i ~ {res}Gaussian {txt}Obs per group: min = {res} 1 {txt}avg = {res} 5.9 {txt}max = {res} 12 {txt}Wald chi2({res}5{txt}) = {res} 243.69 {txt}Log likelihood = {res} -10574.78 {txt}Prob > chi2 = {res}0.0000 {txt}{hline 13}{c TT}{hline 64} union {c |} Coef. Std. Err. z P>|z| [95% Conf. Interval] {hline 13}{c +}{hline 64} age {c |} {res} .0047894 .0024844 1.93 0.054 -.0000798 .0096587 {txt}grade {c |} {res} .0562953 .0097119 5.80 0.000 .0372603 .0753302 {txt}not_smsa {c |} {res}-.1314541 .0442808 -2.97 0.003 -.2182428 -.0446654 {txt}south {c |} {res}-.6230965 .0592539 -10.52 0.000 -.739232 -.5069611 {txt}southXt {c |} {res} .0119443 .0043294 2.76 0.006 .0034589 .0204298 {txt}_cons {c |} {res}-1.930642 .1418695 -13.61 0.000 -2.208701 -1.652583 {txt}{hline 13}{c +}{hline 64} /lnsig2u {c |} {res} .4907899 .0397062{col 58} .4129672 .5686126 {txt}{hline 13}{c +}{hline 64} sigma_u {c |} {res} 1.278126 .0253748{col 58} 1.229348 1.32884 {txt}rho {c |} {res} .6202925 .009352{col 58} .6017991 .638443 {txt}{hline 13}{c BT}{hline 64} Refitting model quad() = {res}16 {txt}Iteration 0: log likelihood = {res}-10556.147 {txt}Iteration 1: log likelihood = {res}-10555.853 {txt}Iteration 2: log likelihood = {res}-10555.853 {txt}Random-effects probit regression Number of obs = {res} 26200 {txt}Group variable (i): {res}idcode {txt}Number of groups = {res} 4434 {txt}Random effects u_i ~ {res}Gaussian {txt}Obs per group: min = {res} 1 {txt}avg = {res} 5.9 {txt}max = {res} 12 {txt}Wald chi2({res}5{txt}) = {res} 216.83 {txt}Log likelihood = {res}-10555.853 {txt}Prob > chi2 = {res}0.0000 {txt}{hline 13}{c TT}{hline 64} union {c |} Coef. Std. Err. z P>|z| [95% Conf. Interval] {hline 13}{c +}{hline 64} age {c |} {res} .0045112 .0025082 1.80 0.072 -.0004047 .0094271 {txt}grade {c |} {res} .0441108 .0099037 4.45 0.000 .0247 .0635216 {txt}not_smsa {c |} {res} -.141098 .046045 -3.06 0.002 -.2313444 -.0508515 {txt}south {c |} {res}-.6454697 .0621128 -10.39 0.000 -.7672086 -.5237308 {txt}southXt {c |} {res} .0134172 .0043892 3.06 0.002 .0048146 .0220199 {txt}_cons {c |} {res}-1.806685 .1443166 -12.52 0.000 -2.089541 -1.52383 {txt}{hline 13}{c +}{hline 64} /lnsig2u {c |} {res} .5808096 .0438762{col 58} .4948138 .6668055 {txt}{hline 13}{c +}{hline 64} sigma_u {c |} {res} 1.336969 .0293306{col 58} 1.2807 1.395709 {txt}rho {c |} {res} .6412537 .0100936{col 58} .6212398 .6607875 {txt}{hline 13}{c BT}{hline 64} Quadrature check Fitted Comparison Comparison quadrature quadrature quadrature 12 points 8 points 16 points {hline 53} Log {res}-10561.065 -10574.78 -10555.853 {txt}likelihood {res}-13.714764 5.2126898 {txt}Difference {res} .00129862 -.00049358 {txt}Relative difference {hline 53} union: {res} .00444829 .00478943 .00451117 {txt}age {res} .00034115 .00006288 {txt}Difference {res} .07669143 .01413662 {txt}Relative difference {hline 53} union: {res} .04824822 .05629525 .04411081 {txt}grade {res} .00804704 -.00413741 {txt}Difference {res} .16678412 -.0857525 {txt}Relative difference {hline 53} union: {res}-.13706993 -.1314541 -.14109796 {txt}not_smsa {res} .00561584 -.00402803 {txt}Difference {res}-.04097061 .02938665 {txt}Relative difference {hline 53} union: {res}-.63058241 -.62309654 -.64546968 {txt}south {res} .00748587 -.01488727 {txt}Difference {res}-.01187136 .02360876 {txt}Relative difference {hline 53} union: {res} .01318534 .01194434 .01341723 {txt}southXt {res} -.001241 .00023189 {txt}Difference {res}-.09411977 .01758658 {txt}Relative difference {hline 53} union: {res}-1.8468379 -1.9306422 -1.8066853 {txt}_cons {res}-.08380426 .0401526 {txt}Difference {res} .04537716 -.02174127 {txt}Relative difference {hline 53} lnsig2u: {res} .56121927 .49078989 .58080961 {txt}_cons {res}-.07042938 .01959034 {txt}Difference {res}-.12549352 .03490674 {txt}Relative difference {hline 53} {com}. * # of points to use in the quadrature approximation of the integral (this checkup is important.) . . ** random-effects model . xtlogit union age grade not_smsa south southXt, re {txt}Fitting comparison model: Iteration 0: log likelihood = {res} -13864.23 {txt}Iteration 1: log likelihood = {res}-13550.511 {txt}Iteration 2: log likelihood = {res} -13545.74 {txt}Iteration 3: log likelihood = {res}-13545.736 {txt}Fitting full model: tau = {res} 0.0 {txt}log likelihood = {res}-13545.736 {txt}tau = {res} 0.1 {txt}log likelihood = {res}-12926.225 {txt}tau = {res} 0.2 {txt}log likelihood = {res}-12419.526 {txt}tau = {res} 0.3 {txt}log likelihood = {res}-12003.162 {txt}tau = {res} 0.4 {txt}log likelihood = {res}-11656.844 {txt}tau = {res} 0.5 {txt}log likelihood = {res} -11367.53 {txt}tau = {res} 0.6 {txt}log likelihood = {res}-11129.716 {txt}tau = {res} 0.7 {txt}log likelihood = {res}-10947.266 {txt}tau = {res} 0.8 {txt}log likelihood = {res}-10845.532 {txt}Iteration 0: log likelihood = {res}-10947.266 {txt}Iteration 1: log likelihood = {res}-10604.628 {txt}Iteration 2: log likelihood = {res}-10557.905 {txt}Iteration 3: log likelihood = {res}-10556.297 {txt}Iteration 4: log likelihood = {res}-10556.294 {txt}Random-effects logistic regression Number of obs = {res} 26200 {txt}Group variable (i): {res}idcode {txt}Number of groups = {res} 4434 {txt}Random effects u_i ~ {res}Gaussian {txt}Obs per group: min = {res} 1 {txt}avg = {res} 5.9 {txt}max = {res} 12 {txt}Wald chi2({res}5{txt}) = {res} 221.95 {txt}Log likelihood = {res}-10556.294 {txt}Prob > chi2 = {res}0.0000 {txt}{hline 13}{c TT}{hline 64} union {c |} Coef. Std. Err. z P>|z| [95% Conf. Interval] {hline 13}{c +}{hline 64} age {c |} {res} .0092401 .0044368 2.08 0.037 .0005441 .0179361 {txt}grade {c |} {res} .0840066 .0181622 4.63 0.000 .0484094 .1196038 {txt}not_smsa {c |} {res}-.2574574 .0844771 -3.05 0.002 -.4230294 -.0918854 {txt}south {c |} {res}-1.152854 .1108294 -10.40 0.000 -1.370075 -.9356323 {txt}southXt {c |} {res} .0237933 .0078548 3.03 0.002 .0083982 .0391884 {txt}_cons {c |} {res} -3.25016 .2622898 -12.39 0.000 -3.764238 -2.736081 {txt}{hline 13}{c +}{hline 64} /lnsig2u {c |} {res} 1.669888 .0430016{col 58} 1.585607 1.75417 {txt}{hline 13}{c +}{hline 64} sigma_u {c |} {res} 2.304685 .0495526{col 58} 2.209582 2.403882 {txt}rho {c |} {res} .6175213 .0101565{col 58} .5974278 .6372209 {txt}{hline 13}{c BT}{hline 64} Likelihood-ratio test of rho=0: {help j_chibar:chibar2(01) = }{res} 5978.89{txt} Prob >= chibar2 = {res}0.000 {txt} {com}. mfx compute {txt}Marginal effects after xtlogit y = Linear prediction (predict) = {res}-2.3516745 {txt}{hline 9}{c TT}{hline 68} variable {c |}{col 17}dy/dx{col 26}Std. Err.{col 40}z{col 45}P>|z|{col 52}[ 95% C.I. ]{col 75}X {hline 9}{c +}{hline 68} age {c |} {res} .0092401 .00444 2.08 0.037 .000544 .017936 30.4322 {txt}grade {c |} {res} .0840066 .01816 4.63 0.000 .048409 .119604 12.7615 {txt}not_smsa*{c |} {res}-.2574574 .08448 -3.05 0.002 -.423029 -.091885 .283702 {txt}south*{c |} {res}-1.152854 .11083 -10.40 0.000 -1.37008 -.935632 .413015 {txt}southXt {c |} {res} .0237933 .00785 3.03 0.002 .008398 .039188 3.96874 {txt}{hline 9}{c BT}{hline 68} (*) dy/dx is for discrete change of dummy variable from 0 to 1 {com}. . quadchk {txt}Refitting model quad() = {res} 8 {txt}Iteration 0: log likelihood = {res}-10575.225 {txt}Iteration 1: log likelihood = {res}-10572.654 {txt}Iteration 2: log likelihood = {res}-10572.636 {txt}Iteration 3: log likelihood = {res}-10572.636 {txt}Random-effects logistic regression Number of obs = {res} 26200 {txt}Group variable (i): {res}idcode {txt}Number of groups = {res} 4434 {txt}Random effects u_i ~ {res}Gaussian {txt}Obs per group: min = {res} 1 {txt}avg = {res} 5.9 {txt}max = {res} 12 {txt}Wald chi2({res}5{txt}) = {res} 238.20 {txt}Log likelihood = {res}-10572.636 {txt}Prob > chi2 = {res}0.0000 {txt}{hline 13}{c TT}{hline 64} union {c |} Coef. Std. Err. z P>|z| [95% Conf. Interval] {hline 13}{c +}{hline 64} age {c |} {res} .0098812 .004394 2.25 0.025 .001269 .0184933 {txt}grade {c |} {res} .106588 .0177167 6.02 0.000 .0718639 .141312 {txt}not_smsa {c |} {res}-.2396422 .0787869 -3.04 0.002 -.3940616 -.0852227 {txt}south {c |} {res}-1.114874 .1070427 -10.42 0.000 -1.324674 -.9050744 {txt}southXt {c |} {res} .0220438 .0077966 2.83 0.005 .0067626 .0373249 {txt}_cons {c |} {res} -3.49539 .2581937 -13.54 0.000 -4.001441 -2.98934 {txt}{hline 13}{c +}{hline 64} /lnsig2u {c |} {res} 1.615656 .042297{col 58} 1.532756 1.698557 {txt}{hline 13}{c +}{hline 64} sigma_u {c |} {res} 2.243031 .0474367{col 58} 2.151957 2.337959 {txt}rho {c |} {res} .6046333 .0101112{col 58} .5846539 .6242693 {txt}{hline 13}{c BT}{hline 64} Refitting model quad() = {res}16 {txt}Iteration 0: log likelihood = {res}-10548.541 {txt}Iteration 1: log likelihood = {res}-10547.917 {txt}Iteration 2: log likelihood = {res}-10547.917 {txt}Random-effects logistic regression Number of obs = {res} 26200 {txt}Group variable (i): {res}idcode {txt}Number of groups = {res} 4434 {txt}Random effects u_i ~ {res}Gaussian {txt}Obs per group: min = {res} 1 {txt}avg = {res} 5.9 {txt}max = {res} 12 {txt}Wald chi2({res}5{txt}) = {res} 221.46 {txt}Log likelihood = {res}-10547.917 {txt}Prob > chi2 = {res}0.0000 {txt}{hline 13}{c TT}{hline 64} union {c |} Coef. Std. Err. z P>|z| [95% Conf. Interval] {hline 13}{c +}{hline 64} age {c |} {res} .009164 .0044567 2.06 0.040 .000429 .0178991 {txt}grade {c |} {res} .0755541 .0174202 4.34 0.000 .041411 .1096971 {txt}not_smsa {c |} {res}-.2664507 .0822027 -3.24 0.001 -.427565 -.1053363 {txt}south {c |} {res}-1.177212 .1120548 -10.51 0.000 -1.396836 -.9575889 {txt}southXt {c |} {res} .023661 .007855 3.01 0.003 .0082655 .0390564 {txt}_cons {c |} {res}-3.176926 .2538795 -12.51 0.000 -3.674521 -2.679332 {txt}{hline 13}{c +}{hline 64} /lnsig2u {c |} {res} 1.702013 .0440343{col 58} 1.615707 1.788318 {txt}{hline 13}{c +}{hline 64} sigma_u {c |} {res} 2.342002 .0515642{col 58} 2.243088 2.445279 {txt}rho {c |} {res} .6250796 .0103197{col 58} .6046455 .6450774 {txt}{hline 13}{c BT}{hline 64} Quadrature check Fitted Comparison Comparison quadrature quadrature quadrature 12 points 8 points 16 points {hline 53} Log {res}-10556.294 -10572.636 -10547.917 {txt}likelihood {res}-16.342507 8.3767469 {txt}Difference {res} .00154813 -.00079353 {txt}Relative difference {hline 53} union: {res} .00924011 .00988115 .00916404 {txt}age {res} .00064104 -.00007607 {txt}Difference {res} .0693755 -.00823256 {txt}Relative difference {hline 53} union: {res} .08400659 .10658796 .07555405 {txt}grade {res} .02258136 -.00845254 {txt}Difference {res} .26880465 -.10061763 {txt}Relative difference {hline 53} union: {res}-.25745741 -.23964215 -.26645066 {txt}not_smsa {res} .01781526 -.00899325 {txt}Difference {res}-.06919693 .03493101 {txt}Relative difference {hline 53} union: {res}-1.1528539 -1.1148743 -1.1772123 {txt}south {res} .03797957 -.02435849 {txt}Difference {res}-.03294396 .02112887 {txt}Relative difference {hline 53} union: {res} .02379331 .02204377 .02366098 {txt}southXt {res}-.00174955 -.00013233 {txt}Difference {res}-.07353102 -.00556171 {txt}Relative difference {hline 53} union: {res}-3.2501596 -3.4953905 -3.1769265 {txt}_cons {res}-.24523084 .07323315 {txt}Difference {res} .07545194 -.02253217 {txt}Relative difference {hline 53} lnsig2u: {res} 1.6698883 1.6156561 1.7020126 {txt}_cons {res}-.05423212 .03212434 {txt}Difference {res} -.0324765 .01923742 {txt}Relative difference {hline 53} {com}. * # of points to use in the quadrature approximation of the integral (this checkup is important.) . . ** conditional fixed-effects logit model . xtlogit union age grade not_smsa south southXt, fe {txt}note: multiple positive outcomes within groups encountered. note: 2744 groups (14165 obs) dropped due to all positive or all negative outcomes. Iteration 0: log likelihood = {res}-4541.9044 {txt}Iteration 1: log likelihood = {res}-4511.1353 {txt}Iteration 2: log likelihood = {res}-4511.1042 {txt}Conditional fixed-effects logistic regression Number of obs = {res} 12035 {txt}Group variable (i): {res}idcode {txt}Number of groups = {res} 1690 {txt}Obs per group: min = {res} 2 {txt}avg = {res} 7.1 {txt}max = {res} 12 {txt}LR chi2({res}5{txt}) = {res} 78.16 {txt}Log likelihood = {res}-4511.1042 {txt}Prob > chi2 = {res}0.0000 {txt}{hline 13}{c TT}{hline 64} union {c |} Coef. Std. Err. z P>|z| [95% Conf. Interval] {hline 13}{c +}{hline 64} age {c |} {res} .0079706 .0050283 1.59 0.113 -.0018848 .0178259 {txt}grade {c |} {res} .0811808 .0419137 1.94 0.053 -.0009686 .1633302 {txt}not_smsa {c |} {res} .0210368 .113154 0.19 0.853 -.2007411 .2428146 {txt}south {c |} {res}-1.007318 .1500491 -6.71 0.000 -1.301409 -.7132271 {txt}southXt {c |} {res} .0263495 .0083244 3.17 0.002 .010034 .0426649 {txt}{hline 13}{c BT}{hline 64} {com}. mfx compute {txt}Marginal effects after clogit y = Pr(union|single outcome w/i idcode) (predict) = {res} 1 {txt}{hline 9}{c TT}{hline 68} variable {c |}{col 17}dy/dx{col 26}Std. Err.{col 40}z{col 45}P>|z|{col 52}[ 95% C.I. ]{col 75}X {hline 9}{c +}{hline 68} age {c |} (no effect){res}{col 71} 30.538 {txt}grade {c |} (no effect){res}{col 71} 12.7934 {txt}not_smsa*{c |} (no effect){res}{col 71} .251516 {txt}south*{c |} (no effect){res}{col 71} .381388 {txt}southXt {c |} (no effect){res}{col 71} 3.72065 {txt}{hline 9}{c BT}{hline 68} (*) dy/dx is for discrete change of dummy variable from 0 to 1 {com}. * The above mfx gives "no effect". But, the following will work! . * *** clogit is the same as the conditional FE logit. *** . mfx compute, predict(pu0) nose {txt}Marginal effects after clogit y = Pr(union|fixed effect is 0) (predict, pu0) = {res} .73128193 {txt}{hline 33}{c TT}{hline 45} variable {c |}{col 45}dy/dx{col 67}X {hline 33}{c +}{hline 45} age {c |} {res}{col 42} .0015663 {col 62} 30.538 {txt}grade {c |} {res}{col 42} .0159527 {col 62} 12.7934 {txt}not_smsa*{c |} {res}{col 42} .0041239 {col 62} .251516 {txt}south*{c |} {res}{col 42}-.2064533 {col 62} .381388 {txt}southXt {c |} {res}{col 42} .0051779 {col 62} 3.72065 {txt}{hline 33}{c BT}{hline 45} (*) dy/dx is for discrete change of dummy variable from 0 to 1 {com}. . . log close {txt}log: {res}C:\Documents and Settings\jlee\My Documents\EC671\xtprobit_logit.smcl {txt}log type: {res}smcl {txt}closed on: {res} 2 Nov 2004, 23:11:22 {txt}{.-} {smcl} {txt}{sf}{ul off}