The m* commands mgen, mtable, and mchange are wrappers for the power -margins- command that is part of official Stata. The m* commands automatically construct the -margins-commands you need and make the output more compact. For example, suppose that you want to compute average marginal effects for the model:
. spex gssclass4, clear // spex is part of SPost . ologit class i.female i.white i.year i.educ c.age##c.age income < output omitted >
To compute marginal effects at the mean (MEM) with mchange:
. mchange, atmeans ologit: Changes in Pr(y) | Number of obs = 5620 Expression: Pr(class), predict(outcome()) | lower working middle upper ------------------------+-------------------------------------------- female | female vs male | -0.001 -0.003 0.004 0.000 p-value | 0.766 0.765 0.765 0.765 white | white vs nonwhite | -0.014 -0.043 0.054 0.003 p-value | 0.002 0.001 0.001 0.001 year | 1996 vs 1980 | 0.004 0.016 -0.019 -0.001 p-value | 0.242 0.249 0.247 0.256 2012 vs 1980 | 0.029 0.092 -0.115 -0.006 p-value | 0.000 0.000 0.000 0.000 2012 vs 1996 | 0.026 0.076 -0.097 -0.005 p-value | 0.000 0.000 0.000 0.000 educ | hs only vs not hs grad | -0.029 -0.053 0.079 0.003 p-value | 0.000 0.000 0.000 0.000 college vs not hs grad | -0.078 -0.294 0.345 0.027 p-value | 0.000 0.000 0.000 0.000 college vs hs only | -0.049 -0.240 0.266 0.024 p-value | 0.000 0.000 0.000 0.000 age | +1 | -0.001 -0.003 0.004 0.000 p-value | 0.000 0.000 0.000 0.000 +SD | -0.021 -0.094 0.107 0.008 p-value | 0.000 0.000 0.000 0.000 Marginal | -0.001 -0.003 0.004 0.000 p-value | 0.000 0.000 0.000 0.000 income | +1 | -0.001 -0.002 0.003 0.000 p-value | 0.000 0.000 0.000 0.000 +SD | -0.031 -0.159 0.175 0.015 p-value | 0.000 0.000 0.000 0.000 Marginal | -0.001 -0.002 0.003 0.000 p-value | 0.000 0.000 0.000 0.000 Predictions at base value | lower working middle upper -------------+-------------------------------------------- Pr(y|base) | 0.059 0.511 0.417 0.013 Base values of regressors | 1. 1. 2. 3. 2. 3. | female white year year educ educ -------------+------------------------------------------------------------------ at | .549 .814 .451 .31 .582 .241 | | age income -------------+---------------------- at | 45.2 68.1 1: Estimates with margins option atmeans.
These reults were generated using margins along with mlincom (an SPost wrapper for lincom). That output, over 1500 lines long, follow:
. margins female, atmeans pwcompare predict(outcome(1)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==1), predict(outcome(1)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ----------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] ----------------+------------------------------------------------ female | female vs male | -.0008964 .003006 -.0067881 .0049953 ----------------------------------------------------------------- . margins female, atmeans pwcompare predict(outcome(2)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==2), predict(outcome(2)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ----------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] ----------------+------------------------------------------------ female | female vs male | -.0030847 .0103355 -.0233418 .0171724 ----------------------------------------------------------------- . margins female, atmeans pwcompare predict(outcome(3)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==3), predict(outcome(3)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ----------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] ----------------+------------------------------------------------ female | female vs male | .0037665 .0126222 -.0209725 .0285055 ----------------------------------------------------------------- . margins female, atmeans pwcompare predict(outcome(4)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==4), predict(outcome(4)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ----------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] ----------------+------------------------------------------------ female | female vs male | .0002146 .0007191 -.0011947 .001624 ----------------------------------------------------------------- . margins white, atmeans pwcompare predict(outcome(1)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==1), predict(outcome(1)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) -------------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] -------------------+------------------------------------------------ white | white vs nonwhite | -.0139377 .0045616 -.0228782 -.0049971 -------------------------------------------------------------------- . margins white, atmeans pwcompare predict(outcome(2)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==2), predict(outcome(2)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) -------------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] -------------------+------------------------------------------------ white | white vs nonwhite | -.043283 .0127358 -.0682448 -.0183213 -------------------------------------------------------------------- . margins white, atmeans pwcompare predict(outcome(3)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==3), predict(outcome(3)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) -------------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] -------------------+------------------------------------------------ white | white vs nonwhite | .054306 .0163801 .0222015 .0864105 -------------------------------------------------------------------- . margins white, atmeans pwcompare predict(outcome(4)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==4), predict(outcome(4)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) -------------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] -------------------+------------------------------------------------ white | white vs nonwhite | .0029146 .0008709 .0012078 .0046215 -------------------------------------------------------------------- . margins year, atmeans pwcompare predict(outcome(1)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==1), predict(outcome(1)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) --------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] --------------+------------------------------------------------ year | 1996 vs 1980 | .0038516 .0032903 -.0025973 .0103005 2012 vs 1980 | .0294961 .004607 .0204665 .0385256 2012 vs 1996 | .0256445 .004218 .0173774 .0339116 --------------------------------------------------------------- . margins year, atmeans pwcompare predict(outcome(2)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==2), predict(outcome(2)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) --------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] --------------+------------------------------------------------ year | 1996 vs 1980 | .0160524 .0139173 -.011225 .0433299 2012 vs 1980 | .0923386 .0142494 .0644103 .120267 2012 vs 1996 | .0762862 .0113535 .0540338 .0985386 --------------------------------------------------------------- . margins year, atmeans pwcompare predict(outcome(3)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==3), predict(outcome(3)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) --------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] --------------+------------------------------------------------ year | 1996 vs 1980 | -.0186776 .0161237 -.0502796 .0129243 2012 vs 1980 | -.1154841 .0173947 -.149577 -.0813911 2012 vs 1996 | -.0968064 .0144821 -.1251908 -.0684221 --------------------------------------------------------------- . margins year, atmeans pwcompare predict(outcome(4)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==4), predict(outcome(4)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) --------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] --------------+------------------------------------------------ year | 1996 vs 1980 | -.0012264 .0010805 -.0033441 .0008914 2012 vs 1980 | -.0063506 .0011686 -.008641 -.0040603 2012 vs 1996 | -.0051243 .0008767 -.0068425 -.003406 --------------------------------------------------------------- . margins educ, atmeans pwcompare predict(outcome(1)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==1), predict(outcome(1)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] ------------------------+------------------------------------------------ educ | hs only vs not hs grad | -.0290935 .0068661 -.0425509 -.0156361 college vs not hs grad | -.0782737 .0073786 -.0927355 -.063812 college vs hs only | -.0491803 .003521 -.0560812 -.0422793 ------------------------------------------------------------------------- . margins educ, atmeans pwcompare predict(outcome(2)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==2), predict(outcome(2)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] ------------------------+------------------------------------------------ educ | hs only vs not hs grad | -.0532385 .0101575 -.073147 -.0333301 college vs not hs grad | -.2936371 .0162028 -.3253939 -.2618802 college vs hs only | -.2403985 .0142774 -.2683817 -.2124154 ------------------------------------------------------------------------- . margins educ, atmeans pwcompare predict(outcome(3)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==3), predict(outcome(3)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] ------------------------+------------------------------------------------ educ | hs only vs not hs grad | .0790268 .0160354 .047598 .1104555 college vs not hs grad | .3446856 .0196002 .30627 .3831012 college vs hs only | .2656588 .0148654 .2365232 .2947945 ------------------------------------------------------------------------- . margins educ, atmeans pwcompare predict(outcome(4)) Pairwise comparisons of adjusted predictions Model VCE : OIM Expression : Pr(class==4), predict(outcome(4)) at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------- | Delta-method Unadjusted | Contrast Std. Err. [95% Conf. Interval] ------------------------+------------------------------------------------ educ | hs only vs not hs grad | .0033052 .0007015 .0019302 .0046802 college vs not hs grad | .0272252 .0028925 .021556 .0328943 college vs hs only | .0239199 .0026517 .0187226 .0291173 ------------------------------------------------------------------------- . margins, at(age=45.15711743772242 age=46.15711743772242) > post atmeans predict(outcome(1)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==1), predict(outcome(1)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 income = 68.07737 (mean) 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 46.15712 income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .0585996 .0033006 17.75 0.000 .0521306 .0650686 2 | .057725 .0032779 17.61 0.000 .0513004 .0641495 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | -0.001 0.000 -0.001 -0.001 . margins, at(age=45.15711743772242 age=46.15711743772242) > post atmeans predict(outcome(2)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==2), predict(outcome(2)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 income = 68.07737 (mean) 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 46.15712 income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .5106898 .0089364 57.15 0.000 .4931747 .5282049 2 | .5076452 .0090158 56.31 0.000 .4899745 .525316 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | -0.003 0.000 -0.004 -0.002 . margins, at(age=45.15711743772242 age=46.15711743772242) > post atmeans predict(outcome(3)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==3), predict(outcome(3)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 income = 68.07737 (mean) 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 46.15712 income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .4173024 .0094484 44.17 0.000 .3987839 .435821 2 | .4210088 .0095647 44.02 0.000 .4022622 .4397553 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | 0.004 0.000 0.003 0.005 . margins, at(age=45.15711743772242 age=46.15711743772242) > post atmeans predict(outcome(4)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==4), predict(outcome(4)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 income = 68.07737 (mean) 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 46.15712 income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .0134082 .001251 10.72 0.000 .0109563 .0158601 2 | .0136211 .0012713 10.71 0.000 .0111294 .0161127 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | 0.000 0.000 0.000 0.000 . margins, at(age=45.15711743772242 age=62.05432488099884) > post atmeans predict(outcome(1)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==1), predict(outcome(1)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 income = 68.07737 (mean) 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 62.05432 income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .0585996 .0033006 17.75 0.000 .0521306 .0650686 2 | .0377982 .0023986 15.76 0.000 .0330969 .0424994 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | -0.021 0.000 -0.024 -0.017 . margins, at(age=45.15711743772242 age=62.05432488099884) > post atmeans predict(outcome(2)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==2), predict(outcome(2)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 income = 68.07737 (mean) 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 62.05432 income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .5106898 .0089364 57.15 0.000 .4931747 .5282049 2 | .4169832 .0096132 43.38 0.000 .3981416 .4358248 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | -0.094 0.000 -0.107 -0.080 . margins, at(age=45.15711743772242 age=62.05432488099884) > post atmeans predict(outcome(3)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==3), predict(outcome(3)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 income = 68.07737 (mean) 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 62.05432 income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .4173024 .0094484 44.17 0.000 .3987839 .435821 2 | .5241374 .0103705 50.54 0.000 .5038115 .5444633 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | 0.107 0.000 0.092 0.122 . margins, at(age=45.15711743772242 age=62.05432488099884) > post atmeans predict(outcome(4)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==4), predict(outcome(4)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 income = 68.07737 (mean) 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 62.05432 income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .0134082 .001251 10.72 0.000 .0109563 .0158601 2 | .0210812 .0018949 11.13 0.000 .0173672 .0247952 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | 0.008 0.000 0.006 0.009 . margins, dydx(age) atmeans predict(outcome(1)) Conditional marginal effects Number of obs = 5620 Model VCE : OIM Expression : Pr(class==1), predict(outcome(1)) dy/dx w.r.t. : age at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | -.0008417 .0000993 -8.48 0.000 -.0010362 -.0006471 ------------------------------------------------------------------------------ . margins, dydx(age) atmeans predict(outcome(2)) Conditional marginal effects Number of obs = 5620 Model VCE : OIM Expression : Pr(class==2), predict(outcome(2)) dy/dx w.r.t. : age at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | -.0028994 .0003651 -7.94 0.000 -.0036148 -.0021839 ------------------------------------------------------------------------------ . margins, dydx(age) atmeans predict(outcome(3)) Conditional marginal effects Number of obs = 5620 Model VCE : OIM Expression : Pr(class==3), predict(outcome(3)) dy/dx w.r.t. : age at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .0035392 .0004264 8.30 0.000 .0027034 .004375 ------------------------------------------------------------------------------ . margins, dydx(age) atmeans predict(outcome(4)) Conditional marginal effects Number of obs = 5620 Model VCE : OIM Expression : Pr(class==4), predict(outcome(4)) dy/dx w.r.t. : age at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- age | .0002018 .0000309 6.53 0.000 .0001412 .0002624 ------------------------------------------------------------------------------ . margins, at(income=68.0773737314545 income=69.0773737314545) > post atmeans predict(outcome(1)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==1), predict(outcome(1)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 69.07737 ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .0585996 .0033006 17.75 0.000 .0521306 .0650686 2 | .0579618 .0032691 17.73 0.000 .0515545 .0643691 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | -0.001 0.000 -0.001 -0.001 . margins, at(income=68.0773737314545 income=69.0773737314545) > post atmeans predict(outcome(2)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==2), predict(outcome(2)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 69.07737 ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .5106898 .0089364 57.15 0.000 .4931747 .5282049 2 | .508476 .0089442 56.85 0.000 .4909457 .5260062 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | -0.002 0.000 -0.002 -0.002 . margins, at(income=68.0773737314545 income=69.0773737314545) > post atmeans predict(outcome(3)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==3), predict(outcome(3)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 69.07737 ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .4173024 .0094484 44.17 0.000 .3987839 .435821 2 | .4199994 .0094616 44.39 0.000 .401455 .4385439 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | 0.003 0.000 0.002 0.003 . margins, at(income=68.0773737314545 income=69.0773737314545) > post atmeans predict(outcome(4)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==4), predict(outcome(4)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 69.07737 ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .0134082 .001251 10.72 0.000 .0109563 .0158601 2 | .0135628 .0012624 10.74 0.000 .0110886 .016037 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | 0.000 0.000 0.000 0.000 . margins, at(income=68.0773737314545 income=134.3357033891054) > post atmeans predict(outcome(1)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==1), predict(outcome(1)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 134.3357 ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .0585996 .0033006 17.75 0.000 .0521306 .0650686 2 | .0280149 .0019427 14.42 0.000 .0242072 .0318226 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | -0.031 0.000 -0.034 -0.027 . margins, at(income=68.0773737314545 income=134.3357033891054) > post atmeans predict(outcome(2)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==2), predict(outcome(2)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 134.3357 ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .5106898 .0089364 57.15 0.000 .4931747 .5282049 2 | .3516408 .0109497 32.11 0.000 .3301799 .3731018 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | -0.159 0.000 -0.174 -0.144 . margins, at(income=68.0773737314545 income=134.3357033891054) > post atmeans predict(outcome(3)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==3), predict(outcome(3)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 134.3357 ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .4173024 .0094484 44.17 0.000 .3987839 .435821 2 | .5918301 .0118435 49.97 0.000 .5686174 .6150429 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | 0.175 0.000 0.159 0.190 . margins, at(income=68.0773737314545 income=134.3357033891054) > post atmeans predict(outcome(4)) Adjusted predictions Number of obs = 5620 Model VCE : OIM Expression : Pr(class==4), predict(outcome(4)) 1._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 2._at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 134.3357 ------------------------------------------------------------------------------ | Delta-method | Margin Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- _at | 1 | .0134082 .001251 10.72 0.000 .0109563 .0158601 2 | .0285141 .0023898 11.93 0.000 .0238301 .0331981 ------------------------------------------------------------------------------ . mlincom 2 - 1 | lincom pvalue ll ul -------------+---------------------------------------- 1 | 0.015 0.000 0.013 0.018 . margins, dydx(income) atmeans predict(outcome(1)) Conditional marginal effects Number of obs = 5620 Model VCE : OIM Expression : Pr(class==1), predict(outcome(1)) dy/dx w.r.t. : income at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- income | -.0006411 .0000428 -14.96 0.000 -.000725 -.0005571 ------------------------------------------------------------------------------ . margins, dydx(income) atmeans predict(outcome(2)) Conditional marginal effects Number of obs = 5620 Model VCE : OIM Expression : Pr(class==2), predict(outcome(2)) dy/dx w.r.t. : income at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- income | -.0022083 .0001096 -20.15 0.000 -.0024231 -.0019935 ------------------------------------------------------------------------------ . margins, dydx(income) atmeans predict(outcome(3)) Conditional marginal effects Number of obs = 5620 Model VCE : OIM Expression : Pr(class==3), predict(outcome(3)) dy/dx w.r.t. : income at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- income | .0026956 .0001275 21.14 0.000 .0024457 .0029455 ------------------------------------------------------------------------------ . margins, dydx(income) atmeans predict(outcome(4)) Conditional marginal effects Number of obs = 5620 Model VCE : OIM Expression : Pr(class==4), predict(outcome(4)) dy/dx w.r.t. : income at : 0.female = .4508897 (mean) 1.female = .5491103 (mean) 0.white = .1859431 (mean) 1.white = .8140569 (mean) 1.year = .238968 (mean) 2.year = .4510676 (mean) 3.year = .3099644 (mean) 1.educ = .1766904 (mean) 2.educ = .5818505 (mean) 3.educ = .2414591 (mean) age = 45.15712 (mean) income = 68.07737 (mean) ------------------------------------------------------------------------------ | Delta-method | dy/dx Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- income | .0001537 .0000129 11.88 0.000 .0001284 .0001791 ------------------------------------------------------------------------------
margins does the work, but the m* commands make margins easier to use.