------------------------------------------------------------------------------ log: c:\bill\jpsm\job_training_example.log log type: text opened on: 27 May 2006, 06:15:58 . * load up sas data set; . use c:\bill\jpsm\job_training_example; . * get contents of data file; . desc; Contains data from c:\bill\jpsm\job_training_example.dta obs: 1,500 vars: 9 17 May 2006 15:09 size: 24,000 (99.9% of memory free) ------------------------------------------------------------------------------ > - storage display value variable name type format label variable label ------------------------------------------------------------------------------ > - pid long %10.0g personal ID number age byte %4.0f age in years lths byte %9.0g =1 if education < hs grad hsgrad byte %9.0g =1 if education is 12 years gths byte %9.0g =1 of education is > 12 years black byte %9.0g =1 if black, =0 otherwise hisp byte %9.0g =1 if hispanic, =0 otherwise nvrwrk byte %9.0g =1 if never worked, =0 otherwise choice byte %9.0g ------------------------------------------------------------------------------ > - Sorted by: . * get summary statistics; . sum; Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- pid | 1500 129138 19201.99 100139 167859 age | 1500 32.904 9.241558 22 73 lths | 1500 .3806667 .4857127 0 1 hsgrad | 1500 .4393333 .4964714 0 1 gths | 1500 .18 .3843156 0 1 -------------+-------------------------------------------------------- black | 1500 .296 .4566432 0 1 hisp | 1500 .1113333 .3146494 0 1 nvrwrk | 1500 .1533333 .3604287 0 1 choice | 1500 2.195333 1.19029 1 4 . * get frequency of choice variable; . tab choice; choice | Freq. Percent Cum. ------------+----------------------------------- 1 | 642 42.80 42.80 2 | 225 15.00 57.80 3 | 331 22.07 79.87 4 | 302 20.13 100.00 ------------+----------------------------------- Total | 1,500 100.00 . * run multinomial logit. omitted groups are; . * whites, those with > 12 years of ed, those w/ work experience; . * base(#) tells STATA what category should be the reference option; . * base(4) is using other as the reference group; . mlogit choice age black hisp nvrwrk lths hsgrad, base(4); Iteration 0: log likelihood = -1955.8922 Iteration 1: log likelihood = -1889.2935 Iteration 2: log likelihood = -1888.2987 Iteration 3: log likelihood = -1888.2957 Iteration 4: log likelihood = -1888.2957 Multinomial logistic regression Number of obs = 1500 LR chi2(18) = 135.19 Prob > chi2 = 0.0000 Log likelihood = -1888.2957 Pseudo R2 = 0.0346 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- 1 | age | .0071385 .0081098 0.88 0.379 -.0087564 .0230334 black | 1.219628 .1833561 6.65 0.000 .8602566 1.578999 hisp | .0372041 .2238755 0.17 0.868 -.4015838 .475992 nvrwrk | .0747461 .190311 0.39 0.694 -.2982567 .4477489 lths | -.0084065 .2065292 -0.04 0.968 -.4131964 .3963833 hsgrad | .3780081 .2079569 1.82 0.069 -.0295799 .785596 _cons | .0295614 .3287135 0.09 0.928 -.6147052 .6738279 -------------+---------------------------------------------------------------- 2 | age | .008348 .0099828 0.84 0.403 -.011218 .0279139 black | .5236467 .2263064 2.31 0.021 .0800942 .9671992 hisp | -.8671109 .3589538 -2.42 0.016 -1.570647 -.1635743 nvrwrk | -.704571 .2840205 -2.48 0.013 -1.261241 -.1479011 lths | -.3472458 .2454952 -1.41 0.157 -.8284075 .1339159 hsgrad | -.0812244 .2454501 -0.33 0.741 -.5622979 .399849 _cons | -.3362433 .3981894 -0.84 0.398 -1.11668 .4441936 -------------+---------------------------------------------------------------- 3 | age | .030957 .0087291 3.55 0.000 .0138483 .0480657 black | .835996 .2102365 3.98 0.000 .4239399 1.248052 hisp | .5933104 .2372465 2.50 0.012 .1283157 1.058305 nvrwrk | -.6829221 .2432276 -2.81 0.005 -1.159639 -.2062047 lths | -.4399217 .2281054 -1.93 0.054 -.887 .0071566 hsgrad | .1041374 .2248972 0.46 0.643 -.3366529 .5449278 _cons | -.9863286 .3613369 -2.73 0.006 -1.694536 -.2781213 ------------------------------------------------------------------------------ (Outcome choice==4 is the comparison group) . * get marginal effects for the 4 options, on the job training; . mfx compute, predict(outcome(1)); Marginal effects after mlogit y = Pr(choice==1) (predict, outcome(1)) = .43659091 ------------------------------------------------------------------------------ variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X ---------+-------------------------------------------------------------------- age | -.0017587 .00146 -1.21 0.228 -.004618 .001101 32.904 black*| .179935 .03034 5.93 0.000 .120472 .239398 .296 hisp*| -.0204535 .04343 -0.47 0.638 -.105568 .064661 .111333 nvrwrk*| .1209001 .03702 3.27 0.001 .048352 .193448 .153333 lths*| .0615804 .03864 1.59 0.111 -.014162 .137323 .380667 hsgrad*| .0881309 .03679 2.40 0.017 .016015 .160247 .439333 ------------------------------------------------------------------------------ (*) dy/dx is for discrete change of dummy variable from 0 to 1 . mfx compute, predict(outcome(2)); Marginal effects after mlogit y = Pr(choice==2) (predict, outcome(2)) = .14782959 ------------------------------------------------------------------------------ variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X ---------+-------------------------------------------------------------------- age | -.0004167 .00102 -0.41 0.683 -.002415 .001582 32.904 black*| -.0422033 .01899 -2.22 0.026 -.079433 -.004974 .296 hisp*| -.1000902 .02168 -4.62 0.000 -.142578 -.057603 .111333 nvrwrk*| -.0648702 .02278 -2.85 0.004 -.109524 -.020217 .153333 lths*| -.0287375 .02424 -1.19 0.236 -.076244 .018769 .380667 hsgrad*| -.0376757 .02394 -1.57 0.115 -.084588 .009237 .439333 ------------------------------------------------------------------------------ (*) dy/dx is for discrete change of dummy variable from 0 to 1 . mfx compute, predict(outcome(3)); Marginal effects after mlogit y = Pr(choice==3) (predict, outcome(3)) = .22017632 ------------------------------------------------------------------------------ variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X ---------+-------------------------------------------------------------------- age | .0043574 .00112 3.87 0.000 .002153 .006561 32.904 black*| .0006449 .02521 0.03 0.980 -.048765 .050055 .296 hisp*| .1365429 .04163 3.28 0.001 .054948 .218138 .111333 nvrwrk*| -.0932408 .02627 -3.55 0.000 -.144732 -.04175 .153333 lths*| -.0621007 .02926 -2.12 0.034 -.119449 -.004752 .380667 hsgrad*| -.0161374 .02891 -0.56 0.577 -.072798 .040523 .439333 ------------------------------------------------------------------------------ (*) dy/dx is for discrete change of dummy variable from 0 to 1 . mfx compute, predict(outcome(4)); Marginal effects after mlogit y = Pr(choice==4) (predict, outcome(4)) = .19540318 ------------------------------------------------------------------------------ variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X ---------+-------------------------------------------------------------------- age | -.002182 .00116 -1.88 0.060 -.004459 .000095 32.904 black*| -.1383767 .02096 -6.60 0.000 -.179454 -.097299 .296 hisp*| -.0159992 .02986 -0.54 0.592 -.074524 .042525 .111333 nvrwrk*| .0372109 .0308 1.21 0.227 -.023149 .09757 .153333 lths*| .0292578 .03014 0.97 0.332 -.029808 .088324 .380667 hsgrad*| -.0343177 .02938 -1.17 0.243 -.0919 .023264 .439333 ------------------------------------------------------------------------------ (*) dy/dx is for discrete change of dummy variable from 0 to 1 . * test for IIA using the Hausam test; . * the program eliminates one choice at ; . * a time then compares the unrestricted; . * estimates to the restricted ones; . mlogtest, hausman; **** Hausman tests of IIA assumption Ho: Odds(Outcome-J vs Outcome-K) are independent of other alternatives. Omitted | chi2 df P>chi2 evidence ---------+------------------------------------ 1 | -5.283 14 1.000 for Ho 2 | 0.353 14 1.000 for Ho 3 | 2.041 14 1.000 for Ho ---------------------------------------------- . log close; log: c:\bill\jpsm\job_training_example.log log type: text closed on: 27 May 2006, 06:17:03 ------------------------------------------------------------------------------