capture log close set more off log using prchangeverify6, replace * prchange: version 1.6.5 * verified: 3/25/01 which prchange which _pemarg use gsstestdata.dta, clear * logit and logistic qui logit feminist age educ lesbian liberal prchange educ, x(age 40 educ 12) fromto h prchange educ, x(age 40 educ 12) fromto uncentered h prchange educ, x(age 40 educ 12) fromto d(4) h prchange educ, x(age 40 educ 12) fromto uncentered d(4) h prchange educ lesbian liberal, x(age 40 educ 12) qui logistic feminist age educ lesbian liberal prchange educ lesbian liberal, x(age 40 educ 12) * probit qui probit feminist age educ lesbian liberal prchange, x(age 40 educ max) rest(median) * cloglog qui cloglog feminist age educ lesbian liberal prchange, rest(upper) * ologit qui ologit mchilds age educ lesbian liberal prchange, x(age max educ min) qui ologit mchilds age educ lesbian liberal faminc prchange, x(age 40 educ min) fromto outcome(1) d(10) prchange, x(age 40 educ min) fromto uncentered outcome(1) d(10) *check unusual values qui ologit dmchilds age educ lesbian liberal faminc prchange qui ologit ngchilds age educ lesbian liberal faminc prchange qui ologit irchilds age educ lesbian liberal faminc prchange * oprobit qui oprobit mchilds age educ lesbian liberal prchange, x(age mean educ 12) rest(upper) qui oprobit mchilds age educ lesbian liberal faminc prchange, x(age mean educ 12) rest(upper) outcome(0) fromto prchange age educ, x(age mean educ 12) rest(upper) d(10) prchange age educ, x(age mean educ 12) rest(upper) uncentered d(10) * mlogit qui mlogit mchilds age educ lesbian liberal prchange, x(age 40 educ 12) qui mlogit mchilds age educ lesbian liberal faminc prchange, x(age 40 educ 12 liberal 5) outcome(2) prchange, x(age 40 educ 12 liberal 5) uncentered d(2) outcome(2) *check unusual values qui mlogit dmchilds age educ lesbian liberal faminc prchange qui mlogit ngchilds age educ lesbian liberal faminc prchange qui mlogit irchilds age educ lesbian liberal faminc prchange * poisson qui poisson ctchilds age educ lesbian liberal prchange, x(age 40 educ 12 liberal 4) qui poisson ctchilds age educ lesbian liberal prchange, x(age 40 educ 12 liberal 4) outcome(3) qui poisson ctchilds age educ lesbian liberal feminist prchange liberal educ age, x(age 40 educ 12 liberal 4) fromto uncentered prchange liberal age educ, x(age 40 educ 12 liberal 4) fromto outcome(2) d(2) prchange liberal educ age, x(age 40 educ 12 liberal 4) fromto uncentered outcome(2) d(2) * nbreg qui nbreg ctchilds age educ lesbian liberal prchange, x(age 40 educ 12 liberal 3) qui nbreg ctchilds age educ lesbian liberal feminist prchange, x(age 40 educ 12 liberal 7) outcome(8) qui nbreg ctchilds age educ lesbian liberal feminist prchange, x(age 40 educ 12 liberal 7) fromto prchange educ age liberal, x(age 40 educ 12 liberal 3) d(2) prchange liberal age educ, x(age 40 educ 12 liberal 3) uncentered d(2) * zip qui zip zchilds age educ lesbian liberal, inf(age faminc liberal) prchange, x(age 40 educ median faminc 45) prchange, x(age max educ 12 faminc mean) outcome(0) prchange educ faminc, x(age max educ 12 faminc mean) uncentered outcome(0) prchange educ faminc, x(age max educ 12 faminc mean) uncentered outcome(0) d(4) * zinb qui zinb zchilds age educ lesbian liberal, inf(age educ faminc) prchange, x(age 40 educ 12 faminc 45) qui zinb zchilds age educ lesbian liberal, inf(age educ faminc liberal) prchange, x(age 40 educ 12 faminc 60) outcome(4) prchange educ faminc, x(age 40 educ 12 faminc 45) fromto d(4) prchange educ faminc, x(age 40 educ 12 faminc 45) fromto d(4) uncentered * Testing marginal effects with output from LIMDEP 7 * RM4CLDV Ch 3: Binary logit - verified 12/6/00 use binlfp2,clear logit lfp k5 k618 age wc hc lwg inc, nolog prchange /* +---------------------------------------------+ | Multinomial Logit Model | +---------------------------------------------+ +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Characteristics in numerator of Prob[Y = 1] Constant 3.182140457 .64437510 4.938 .0000 K5 -1.462913039 .19700061 -7.426 .0000 .23771580 K618 -.6457068349E-01 .68000829E-01 -.950 .3423 1.3532537 AGE -.6287055111E-01 .12783091E-01 -4.918 .0000 42.537849 WC .8072737782 .22997989 3.510 .0004 .28154050 HC .1117335717 .20603972 .542 .5876 .39176627 LWG .6046931218 .15081757 4.009 .0001 1.0971148 INC -.3444643073E-01 .82083765E-02 -4.196 .0000 20.128965 +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Marginal effects on Prob[Y = 1] Constant .7762769957 .15584838 4.981 .0000 K5 -.3568747999 .48210796E-01 -7.402 .0000 .23771580 K618 -.1575189306E-01 .16589340E-01 -.950 .3424 1.3532537 AGE -.1533714906E-01 .31108547E-02 -4.930 .0000 42.537849 WC .1969328732 .55947366E-01 3.520 .0004 .28154050 HC .2725718822E-01 .50271630E-01 .542 .5877 .39176627 LWG .1475137148 .36744550E-01 4.015 .0001 1.0971148 INC -.8403140000E-02 .20046214E-02 -4.192 .0000 20.128965 */ * RM4CLDV Ch 3: Binary probit - verified 12/6/00 use binlfp2,clear probit lfp k5 k618 age wc hc lwg inc, nolog prchange /* +---------------------------------------------+ | Binomial Probit Model | +---------------------------------------------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Index function for probability Constant 1.918422308 .38065387 5.040 .0000 K5 -.8747111768 .11355839 -7.703 .0000 .23771580 K618 -.3859449198E-01 .40489311E-01 -.953 .3405 1.3532537 AGE -.3782350247E-01 .76093431E-02 -4.971 .0000 42.537849 WC .4883143923 .13548734 3.604 .0003 .28154050 HC .5717035056E-01 .12400528 .461 .6448 .39176627 LWG .3656287134 .87779191E-01 4.165 .0000 1.0971148 INC -.2052502534E-01 .47768634E-02 -4.297 .0000 20.128965 +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Index function for probability Constant .7506026112 .14798760 5.072 .0000 K5 -.3422398139 .44525077E-01 -7.686 .0000 .23771580 K618 -.1510049500E-01 .15840334E-01 -.953 .3404 1.3532537 AGE -.1479883736E-01 .29733362E-02 -4.977 .0000 42.537849 WC .1910580671 .52960432E-01 3.608 .0003 .28154050 HC .2236849220E-01 .48523420E-01 .461 .6448 .39176627 LWG .1430560237 .34259780E-01 4.176 .0000 1.0971148 INC -.8030628895E-02 .18697205E-02 -4.295 .0000 20.128965 */ * RM4CLDV Ch 5: Ordinal Logit - verified 12/6/00 use ordwarm2,clear ologit warm yr89 male white age ed prst, nolog prchange /* +---------------------------------------------+ | Ordered Probit Model | | Logistic Probability Model | +---------------------------------------------+ +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Index function for probability Constant 2.465362053 .24019735 10.264 .0000 YR89 .5239024812 .82726851E-01 6.333 .0000 .39860445 MALE -.7332997387 .79453652E-01 -9.229 .0000 .46489315 WHITE -.3911594756 .11968218 -3.268 .0011 .87658090 AGE -.2166550942E-01 .25416098E-02 -8.524 .0000 44.935456 ED .6717275019E-01 .15977684E-01 4.204 .0000 12.218055 PRST .6072712231E-02 .33018864E-02 1.839 .0659 39.585259 Threshold parameters for index Mu( 1) 1.834457988 .63291766E-01 28.984 .0000 Mu( 2) 3.727215868 .82017394E-01 45.444 .0000 +------------------------------------------------------+ | Marginal Effects for OrdLogit | +----------+----------+----------+----------+----------+ | Variable | WARM0=0 | WARM0=1 | WARM0=2 | WARM0=3 | +----------+----------+----------+----------+----------+ | ONE | -.2438 | -.3635 | .2739 | .3334 | | YR89 | -.0518 | -.0773 | .0582 | .0708 | | MALE | .0725 | .1081 | -.0815 | -.0992 | | WHITE | .0387 | .0577 | -.0435 | -.0529 | | AGE | .0021 | .0032 | -.0024 | -.0029 | | ED | -.0066 | -.0099 | .0075 | .0091 | | PRST | -.0006 | -.0009 | .0007 | .0008 | +----------+----------+----------+----------+----------+ */ * RM4CLDV Ch 5: Ordinal Probit - verified 12/6/00 use ordwarm2,clear oprobit warm yr89 male white age ed prst, nolog prchange /* +---------------------------------------------+ | Ordered Probit Model | +---------------------------------------------+ +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Index function for probability Constant 1.428578307 .13929995 10.255 .0000 YR89 .3188147042 .48583695E-01 6.562 .0000 .39860445 MALE -.4170287097 .46041475E-01 -9.058 .0000 .46489315 WHITE -.2265002456 .70073897E-01 -3.232 .0012 .87658090 AGE -.1222129917E-01 .14782079E-02 -8.268 .0000 44.935456 ED .3872338654E-01 .92824800E-02 4.172 .0000 12.218055 PRST .3282991562E-02 .19192003E-02 1.711 .0872 39.585259 Threshold parameters for index Mu( 1) 1.068019409 .34793659E-01 30.696 .0000 Mu( 2) 2.196742035 .43462929E-01 50.543 .0000 +------------------------------------------------------+ | Marginal Effects for OrdProbt | +----------+----------+----------+----------+----------+ | Variable | WARM0=0 | WARM0=1 | WARM0=2 | WARM0=3 | +----------+----------+----------+----------+----------+ | ONE | -.2717 | -.2919 | .2109 | .3527 | | YR89 | -.0606 | -.0651 | .0471 | .0787 | | MALE | .0793 | .0852 | -.0616 | -.1030 | | WHITE | .0431 | .0463 | -.0334 | -.0559 | | AGE | .0023 | .0025 | -.0018 | -.0030 | | ED | -.0074 | -.0079 | .0057 | .0096 | | PRST | -.0006 | -.0007 | .0005 | .0008 | +----------+----------+----------+----------+----------+ */ * RM4CLDV Ch 6: Nominal Outcomes * LIMDEP would not run?? * RM4CLDV Ch 8: PRM - verified 12/6/00 use couart2, clear qui poisson art fem mar kid5 phd ment, nolog prchange /* LIMDEP marginals differ slightly since they seem to be based on different predicted value. I think SPOST is correct. --jsl +---------------------------------------------+ | Poisson Regression | +---------------------------------------------+ +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Constant .3046168422 .10298215 2.958 .0031 FEM -.2245942259 .54613757E-01 -4.112 .0000 .46010929 MAR .1552433860 .61374690E-01 2.529 .0114 .66229508 KID5 -.1848827020 .40127172E-01 -4.607 .0000 .49508197 PHD .1282257535E-01 .26397193E-01 .486 .6271 3.1031093 MENT .2554274773E-01 .20060778E-02 12.733 .0000 8.7672125 +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Constant .5156846879 .18742784 2.751 .0059 FEM -.3802147066 .99397208E-01 -3.825 .0001 .46010929 MAR .2628109348 .11170213 2.353 .0186 .66229508 KID5 -.3129872196 .73031579E-01 -4.286 .0000 .49508197 PHD .2170728880E-01 .48042973E-01 .452 .6514 3.1031093 MENT .4324122001E-01 .36510678E-02 11.843 .0000 8.7672125 */ * RM4CLDV Ch 8: NBRM - verified 12/6/00 use couart2, clear qui nbreg art fem mar kid5 phd ment, nolog prchange /* LIMDEP marginals differ slightly since they seem to be based on different predicted value. I think SPOST is correct. --jsl +---------------------------------------------+ | Negative Binomial Regression | +---------------------------------------------+ +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Constant .2561440419 .14088343 1.818 .0690 FEM -.2164184294 .76725070E-01 -2.821 .0048 .46010929 MAR .1504894586 .84210399E-01 1.787 .0739 .66229508 KID5 -.1764152459 .53828662E-01 -3.277 .0010 .49508197 PHD .1527115579E-01 .36258477E-01 .421 .6736 3.1031093 MENT .2908234254E-01 .31962782E-02 9.099 .0000 8.7672125 Overdispersion parameter for negative binomial model Alpha .4416204769 .52241406E-01 8.453 .0000 +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Constant .4367074542 .26508492 1.647 .0995 FEM -.3689780977 .14436516 -2.556 .0106 .46010929 MAR .2565738709 .15844949 1.619 .1054 .66229508 KID5 -.3007755026 .10128350 -2.970 .0030 .49508197 PHD .2603623929E-01 .68223606E-01 .382 .7027 3.1031093 MENT .4958333474E-01 .60140867E-02 8.245 .0000 8.7672125 */ * RM4CLDV Ch 8: ZIP use couart2, clear qui zip art fem mar kid5 phd ment, inf(fem mar kid5 phd ment) vuong nolog prchange /* +----------------------------------------------------------------------+ | Zero Altered Poisson Regression Model | | Logistic distribution used for splitting model. | | Vuong statistic for testing ZIP vs. unaltered model is 5.9814 | | Distributed as standard normal. A value greater than | | +1.96 favors the zero altered Z.I.Poisson model. | | A value less than -1.96 rejects the ZIP model. | +----------------------------------------------------------------------+ +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Poisson/Negbin regression model Constant .6408380343 .93871217E-01 6.827 .0000 FEM -.2091445779 .53192738E-01 -3.932 .0001 .46010929 MAR .1037509411 .57307146E-01 1.810 .0702 .66229508 KID5 -.1433196644 .36169739E-01 -3.962 .0001 .49508197 PHD -.6166062012E-02 .22554341E-01 -.273 .7846 3.1031093 MENT .1809772537E-01 .14247000E-02 12.703 .0000 8.7672125 Zero inflation model Constant -.5770603212 .50202649 -1.149 .2504 FEM .1097471967 .27754038 .395 .6925 .46010929 MAR -.3540134918 .30942379 -1.144 .2526 .66229508 KID5 .2171006204 .18853735 1.151 .2495 .49508197 PHD .1272250778E-02 .13287880 .010 .9924 3.1031093 MENT -.1341135368 .31257044E-01 -4.291 .0000 8.7672125 +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Constant 1.328163759 .21308395 6.233 .0000 FEM -.4132860761 .11147948 -3.707 .0002 .46010929 MAR .2819299084 .12056336 2.338 .0194 .66229508 KID5 -.3196400023 .76448810E-01 -4.181 .0000 .49508197 PHD -.1168056422E-01 .49914435E-01 -.234 .8150 3.1031093 MENT .6775586547E-01 .10035190E-01 6.752 .0000 8.7672125 */ * RM4CLDV Ch 8: ZINB use couart2, clear qui zinb art fem mar kid5 phd ment, inf(fem mar kid5 phd ment) vuong nolog prchange /* +----------------------------------------------------------------------+ | Zero Altered Neg.Binomial Regression Model | | Logistic distribution used for splitting model. | | Vuong statistic for testing ZIP vs. unaltered model is 2.3185 | | Distributed as standard normal. A value greater than | | +1.96 favors the zero altered Z.I.Neg_Bin model. | | A value less than -1.96 rejects the ZIP model. | +----------------------------------------------------------------------+ +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Poisson/Negbin regression model Constant .4167466020 .14757670 2.824 .0047 FEM -.1955068333 .78739846E-01 -2.483 .0130 .46010929 MAR .9758258391E-01 .85764108E-01 1.138 .2552 .66229508 KID5 -.1517324502 .54075119E-01 -2.806 .0050 .49508197 PHD -.7001514503E-03 .36482078E-01 -.019 .9847 3.1031093 MENT .2478620306E-01 .31105703E-02 7.968 .0000 8.7672125 Overdispersion parameter Alpha .3766810687 .50499088E-01 7.459 .0000 Zero inflation model Constant -.1916860235 1.1904273 -.161 .8721 FEM .6359326068 .75194896 .846 .3977 .46010929 MAR -1.499469145 .82562789 -1.816 .0693 .66229508 KID5 .6284274950 .45924528 1.368 .1712 .49508197 PHD -.3771530810E-01 .32187945 -.117 .9067 3.1031093 MENT -.8822934899 .37812504 -2.333 .0196 1.0000000 +---------+--------------+----------------+--------+---------+----------+ |Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] | Mean of X| +---------+--------------+----------------+--------+---------+----------+ Constant .6769194657 .31020676 2.182 .0291 FEM -.2515104394 .17217705 -1.461 .1441 .46010929 MAR .1321340645 .21811993 .606 .5447 .66229508 KID5 -.2571164238 .12177700 -2.111 .0347 .49508197 PHD .4732121566E-01 .73778012E-01 .641 .5213 3.1031093 MENT .4233995753E-01 .90234066E-02 4.692 .0000 8.7672125 Constant .1054079271E-01 .35024919E-01 .301 .7635 FEM .6769194657 .31020676 2.182 .0291 .46010929 MAR -.2515104394 .17217705 -1.461 .1441 .66229508 KID5 .1321340645 .21811993 .606 .5447 .49508197 PHD -.2571164238 .12177700 -2.111 .0347 3.1031093 MENT .4732121566E-01 .73778012E-01 .641 .5213 8.7672125 */ log close