Hello,
I am able to produce pairwise comparisons or contrasts with mimrgns with the contrast dy/dx, SE, and CIs, but not the p-values. When I use pwcompare(effects) to obtain p-values, the code stops running after definitions of the _at levels; no contrasts, SEs, or CIs follow. Can you help me to view the p-values for each comparison? Here is the code and output so far:
mi estimate: svy: logistic Alcohol ib0
> .Gender ib0.ParEdu ib0.Race c.Age c.Fa
> mRel##c.FamHx c.FamRel##c.ParAtt_Alc c
> .FamRel##c.FamMan c.FamRel##c.FamConfl
Multiple-imputation estimates Imputations = 10
Survey: Logistic regression Number of obs = 35,198
Number of strata = 65 Population size = 160,214.29
Number of PSUs = 625
Average RVI = 0.0194
Largest FMI = 0.0796
Complete DF = 560
DF adjustment: Small sample DF: min = 381.54
avg = 541.95
max = 557.71
Model F test: Equal FMI F( 26, 557.4) = 95.72
Within VCE type: Linearized Prob > F = 0.0000
Alcohol Coefficient Std. err. t P>t [95% conf. interval]
Gender
Cis male -.1928048 .0964194 -2.00 0.046 -.3821948 -.0034148
Trans .0719635 .3754549 0.19 0.848 -.6655192 .8094461
Other -.0345483 .3089848 -0.11 0.911 -.6414849 .5723883
ParEdu
College -.0596366 .1959337 -0.30 0.761 -.4445058 .3252327
Some College .0235523 .2043461 0.12 0.908 -.3778492 .4249538
High School .0848689 .200519 0.42 0.672 -.3090073 .478745
Some High Sch.. .2030791 .2303097 0.88 0.378 -.2493894 .6555476
Grade School .. .0908952 .2586879 0.35 0.725 -.4172328 .5990233
IDK -.4030745 .2327125 -1.73 0.084 -.8601862 .0540373
N/A -.2749817 .4756616 -0.58 0.564 -1.210228 .6602645
Race
Hispanic .5485 .1195447 4.59 0.000 .3136827 .7833172
Multiracial .1636419 .2024677 0.81 0.419 -.2340536 .5613374
Asian -.370364 .2374845 -1.56 0.119 -.8368873 .0961594
Black -.1600875 .2891246 -0.55 0.580 -.72803 .4078551
Native American -.8731909 .3119547 -2.80 0.005 -1.485941 -.260441
Pacific Islan.. -.0265193 .239738 -0.11 0.912 -.4974197 .4443811
Age .2412244 .0225822 10.68 0.000 .1968664 .2855823
FamRel -.6681113 .0935536 -7.14 0.000 -.8518781 -.4843445
FamHx 1.089896 .2369505 4.60 0.000 .6244371 1.555355
c.FamRel#c.FamHx .3814078 .1126626 3.39 0.001 .1600889 .6027267
FamRel 0 (omitted)
ParAtt_Alc .4816989 .1053049 4.57 0.000 .2748387 .6885591
c.FamRel#
c.ParAtt_Alc .2656229 .0583024 4.56 0.000 .1510997 .3801462
FamRel 0 (omitted)
FamMan .1173456 .0793785 1.48 0.140 -.0385741 .2732652
c.FamRel#
c.FamMan .2659852 .0422492 6.30 0.000 .1829977 .3489727
FamRel 0 (omitted)
FamConfl .2252861 .0783911 2.87 0.004 .0713066 .3792655
c.FamRel#
c.FamConfl -.0882419 .0421145 -2.10 0.037 -.1709645 -.0055192
_cons -6.725947 .3969068 -16.95 0.000 -7.505585 -5.94631
Note: Strata with single sampling unit centered at overall mean.
mimrgns, dydx(FamRel) at (FamMan=(0(1)3)) predict(pr) vce(unconditional) cmdmargi
> ns
Multiple-imputation estimates Imputations = 10
Average marginal effects Number of obs = 35,198
Number of strata = 65 Population size = 160,214.29
Number of PSUs = 625
Average RVI = 0.0056
Largest FMI = 0.0083
Complete DF = 560
DF adjustment: Small sample DF: min = 551.06
avg = 552.73
Within VCE type: Linearized max = 554.32
Expression : Pr(Alcohol), predict(pr)
dy/dx w.r.t. : FamRel
1._at : FamMan = 0
2._at : FamMan = 1
3._at : FamMan = 2
4._at : FamMan = 3
dy/dx Std. err. t P>t [95% conf. interval]
_at
1 -.0141557 .002657 -5.33 0.000 -.0193748 -.0089366
2 -.0108982 .002422 -4.50 0.000 -.0156556 -.0061407
3 -.0006164 .0039758 -0.16 0.877 -.008426 .0071932
4 .0226229 .010087 2.24 0.025 .0028094 .0424364
mimrgns, dydx(FamRel) at (FamMan=(0(1)3)) predict(pr) vce(unconditional) pwcompar
> e cmdmargins
Multiple-imputation estimates
Pairwise comparisons of average marginal effects
Imputations = 10
Number of obs = 35,198
Number of strata = 65 Population size = 160,214.29
Number of PSUs = 625
Average RVI = 0.0056
Largest FMI = 0.0083
Complete DF = 560
DF adjustment: Small sample DF: min = 551.06
avg = 552.73
Within VCE type: Linearized max = 554.32
Expression : Pr(Alcohol), predict(pr)
dy/dx w.r.t. : FamRel
1._at : FamMan = 0
2._at : FamMan = 1
3._at : FamMan = 2
4._at : FamMan = 3
Contrast
dy/dx Std. err. [95% conf. interval]
_at
2 vs 1 .0032575 .001418 .0004723 .0060427
3 vs 1 .0135393 .0044723 .0047546 .022324
4 vs 1 .0367786 .011111 .0149537 .0586034
3 vs 2 .0102818 .0031301 .0041335 .0164301
4 vs 2 .0335211 .0098788 .0141166 .0529256
4 vs 3 .0232393 .0068077 .0098673 .0366113
mimrgns, dydx(FamRel) at (FamMan=(0(1)3)) predict(pr) vce(unconditional) pwcompar
> e(effects) cmdmargins
Multiple-imputation estimates
Pairwise comparisons of average marginal effects
Imputations = 10
Number of obs = 35,198
Number of strata = 65 Population size = 160,214.29
Number of PSUs = 625
Average RVI = 0.0056
Largest FMI = 0.0083
Complete DF = 560
DF adjustment: Small sample DF: min = 551.06
avg = 552.73
Within VCE type: Linearized max = 554.32
Expression : Pr(Alcohol), predict(pr)
dy/dx w.r.t. : FamRel
1._at : FamMan = 0
2._at : FamMan = 1
3._at : FamMan = 2
4._at : FamMan = 3
I am able to produce pairwise comparisons or contrasts with mimrgns with the contrast dy/dx, SE, and CIs, but not the p-values. When I use pwcompare(effects) to obtain p-values, the code stops running after definitions of the _at levels; no contrasts, SEs, or CIs follow. Can you help me to view the p-values for each comparison? Here is the code and output so far:
mi estimate: svy: logistic Alcohol ib0
> .Gender ib0.ParEdu ib0.Race c.Age c.Fa
> mRel##c.FamHx c.FamRel##c.ParAtt_Alc c
> .FamRel##c.FamMan c.FamRel##c.FamConfl
Multiple-imputation estimates Imputations = 10
Survey: Logistic regression Number of obs = 35,198
Number of strata = 65 Population size = 160,214.29
Number of PSUs = 625
Average RVI = 0.0194
Largest FMI = 0.0796
Complete DF = 560
DF adjustment: Small sample DF: min = 381.54
avg = 541.95
max = 557.71
Model F test: Equal FMI F( 26, 557.4) = 95.72
Within VCE type: Linearized Prob > F = 0.0000
Alcohol Coefficient Std. err. t P>t [95% conf. interval]
Gender
Cis male -.1928048 .0964194 -2.00 0.046 -.3821948 -.0034148
Trans .0719635 .3754549 0.19 0.848 -.6655192 .8094461
Other -.0345483 .3089848 -0.11 0.911 -.6414849 .5723883
ParEdu
College -.0596366 .1959337 -0.30 0.761 -.4445058 .3252327
Some College .0235523 .2043461 0.12 0.908 -.3778492 .4249538
High School .0848689 .200519 0.42 0.672 -.3090073 .478745
Some High Sch.. .2030791 .2303097 0.88 0.378 -.2493894 .6555476
Grade School .. .0908952 .2586879 0.35 0.725 -.4172328 .5990233
IDK -.4030745 .2327125 -1.73 0.084 -.8601862 .0540373
N/A -.2749817 .4756616 -0.58 0.564 -1.210228 .6602645
Race
Hispanic .5485 .1195447 4.59 0.000 .3136827 .7833172
Multiracial .1636419 .2024677 0.81 0.419 -.2340536 .5613374
Asian -.370364 .2374845 -1.56 0.119 -.8368873 .0961594
Black -.1600875 .2891246 -0.55 0.580 -.72803 .4078551
Native American -.8731909 .3119547 -2.80 0.005 -1.485941 -.260441
Pacific Islan.. -.0265193 .239738 -0.11 0.912 -.4974197 .4443811
Age .2412244 .0225822 10.68 0.000 .1968664 .2855823
FamRel -.6681113 .0935536 -7.14 0.000 -.8518781 -.4843445
FamHx 1.089896 .2369505 4.60 0.000 .6244371 1.555355
c.FamRel#c.FamHx .3814078 .1126626 3.39 0.001 .1600889 .6027267
FamRel 0 (omitted)
ParAtt_Alc .4816989 .1053049 4.57 0.000 .2748387 .6885591
c.FamRel#
c.ParAtt_Alc .2656229 .0583024 4.56 0.000 .1510997 .3801462
FamRel 0 (omitted)
FamMan .1173456 .0793785 1.48 0.140 -.0385741 .2732652
c.FamRel#
c.FamMan .2659852 .0422492 6.30 0.000 .1829977 .3489727
FamRel 0 (omitted)
FamConfl .2252861 .0783911 2.87 0.004 .0713066 .3792655
c.FamRel#
c.FamConfl -.0882419 .0421145 -2.10 0.037 -.1709645 -.0055192
_cons -6.725947 .3969068 -16.95 0.000 -7.505585 -5.94631
Note: Strata with single sampling unit centered at overall mean.
mimrgns, dydx(FamRel) at (FamMan=(0(1)3)) predict(pr) vce(unconditional) cmdmargi
> ns
Multiple-imputation estimates Imputations = 10
Average marginal effects Number of obs = 35,198
Number of strata = 65 Population size = 160,214.29
Number of PSUs = 625
Average RVI = 0.0056
Largest FMI = 0.0083
Complete DF = 560
DF adjustment: Small sample DF: min = 551.06
avg = 552.73
Within VCE type: Linearized max = 554.32
Expression : Pr(Alcohol), predict(pr)
dy/dx w.r.t. : FamRel
1._at : FamMan = 0
2._at : FamMan = 1
3._at : FamMan = 2
4._at : FamMan = 3
dy/dx Std. err. t P>t [95% conf. interval]
_at
1 -.0141557 .002657 -5.33 0.000 -.0193748 -.0089366
2 -.0108982 .002422 -4.50 0.000 -.0156556 -.0061407
3 -.0006164 .0039758 -0.16 0.877 -.008426 .0071932
4 .0226229 .010087 2.24 0.025 .0028094 .0424364
mimrgns, dydx(FamRel) at (FamMan=(0(1)3)) predict(pr) vce(unconditional) pwcompar
> e cmdmargins
Multiple-imputation estimates
Pairwise comparisons of average marginal effects
Imputations = 10
Number of obs = 35,198
Number of strata = 65 Population size = 160,214.29
Number of PSUs = 625
Average RVI = 0.0056
Largest FMI = 0.0083
Complete DF = 560
DF adjustment: Small sample DF: min = 551.06
avg = 552.73
Within VCE type: Linearized max = 554.32
Expression : Pr(Alcohol), predict(pr)
dy/dx w.r.t. : FamRel
1._at : FamMan = 0
2._at : FamMan = 1
3._at : FamMan = 2
4._at : FamMan = 3
Contrast
dy/dx Std. err. [95% conf. interval]
_at
2 vs 1 .0032575 .001418 .0004723 .0060427
3 vs 1 .0135393 .0044723 .0047546 .022324
4 vs 1 .0367786 .011111 .0149537 .0586034
3 vs 2 .0102818 .0031301 .0041335 .0164301
4 vs 2 .0335211 .0098788 .0141166 .0529256
4 vs 3 .0232393 .0068077 .0098673 .0366113
mimrgns, dydx(FamRel) at (FamMan=(0(1)3)) predict(pr) vce(unconditional) pwcompar
> e(effects) cmdmargins
Multiple-imputation estimates
Pairwise comparisons of average marginal effects
Imputations = 10
Number of obs = 35,198
Number of strata = 65 Population size = 160,214.29
Number of PSUs = 625
Average RVI = 0.0056
Largest FMI = 0.0083
Complete DF = 560
DF adjustment: Small sample DF: min = 551.06
avg = 552.73
Within VCE type: Linearized max = 554.32
Expression : Pr(Alcohol), predict(pr)
dy/dx w.r.t. : FamRel
1._at : FamMan = 0
2._at : FamMan = 1
3._at : FamMan = 2
4._at : FamMan = 3
Comment