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