Hello Statalisters,
I am working on a doctorate exploring reactions to potentially uncivil content in online political news articles. In my analysis, respondents were exposed to one of three content treatments (i.exp3treat) in an experiment where the dependent variable is perceptions of incivility (incvltyexp3) on a categorical scale, ranging from 1 (no incivility) to 5 (extreme incivility). Using Stata 17.0, and running the 'margins' command on my 'oprobit' model (1st command line with results omitted), produces the following results (second command line; results condensed here for clarity):
oprobit incvltyexp3 i.exp3treat ingroupexp3 outgroupexp3 Q29_1 Q29_2 Q29_3 Q29_4 postrtdem postrtrep negtrtdem negtrtrep totalknow Q12 Q13 voted Q21 Q22 Q4 Q5 Q6 Q7white Q7black Q7asian Q8 Q11
margins i.exp3treat, at(Q12=(4) Q13=(5) voted=1 Q21=(8) Q22=(5) totalknow=(5) Q6=0 Q7white=1 Q7black=0 Q7asian=0) atmeans
------------------------------------------------------------------------------------
| Delta-method
| Margin std. err. z P>|z| [95% conf. interval]
-------------------+----------------------------------------------------------------
_predict#exp3treat |
1 1 | .0641817 .013763 4.66 0.000 .0372066 .0911567
1 2 | .0804855 .0165201 4.87 0.000 .0481067 .1128643
1 3 | .1555602 .024187 6.43 0.000 .1081545 .2029658
2 1 | .1885732 .0220098 8.57 0.000 .1454348 .2317115
2 2 | .2116793 .02284 9.27 0.000 .1669138 .2564449
2 3 | .2816162 .0221867 12.69 0.000 .238131 .3251013
3 1 | .3249617 .0183643 17.70 0.000 .2889684 .360955
3 2 | .3313897 .0178992 18.51 0.000 .2963079 .3664715
3 3 | .3220353 .0185277 17.38 0.000 .2857217 .358349
4 1 | .2641419 .0221885 11.90 0.000 .2206532 .3076306
4 2 | .2452802 .0225282 10.89 0.000 .2011257 .2894347
4 3 | .1752461 .0202165 8.67 0.000 .1356225 .2148697
5 1 | .1581416 .0252592 6.26 0.000 .1086345 .2076487
5 2 | .1311653 .0230277 5.70 0.000 .0860319 .1762987
5 3 | .0655423 .0135039 4.85 0.000 .0390752 .0920094
------------------------------------------------------------------------------------
The issue I am having is this: my doctoral adviser wants me to report combined results for DV values 4 and 5 for each treatment, including combined standard errors and confidence intervals. Is there Stata syntax that will compute these values? I keep getting error messages when I try to specify more than one specific value of the dependent variable. For example, "predict(outcome(4 | 5)) gives me an r(111) error, and "predict(outcome(4) | (5))" an r(198) error. The same thing happens with "&" instead of "|" in the syntax.
Any guidance or solutions from the Stata community would be greatly appreciated. Please let me know if I need to add or clarify anything presented here, as this is my first post. Thank you in advance!
I am working on a doctorate exploring reactions to potentially uncivil content in online political news articles. In my analysis, respondents were exposed to one of three content treatments (i.exp3treat) in an experiment where the dependent variable is perceptions of incivility (incvltyexp3) on a categorical scale, ranging from 1 (no incivility) to 5 (extreme incivility). Using Stata 17.0, and running the 'margins' command on my 'oprobit' model (1st command line with results omitted), produces the following results (second command line; results condensed here for clarity):
oprobit incvltyexp3 i.exp3treat ingroupexp3 outgroupexp3 Q29_1 Q29_2 Q29_3 Q29_4 postrtdem postrtrep negtrtdem negtrtrep totalknow Q12 Q13 voted Q21 Q22 Q4 Q5 Q6 Q7white Q7black Q7asian Q8 Q11
margins i.exp3treat, at(Q12=(4) Q13=(5) voted=1 Q21=(8) Q22=(5) totalknow=(5) Q6=0 Q7white=1 Q7black=0 Q7asian=0) atmeans
------------------------------------------------------------------------------------
| Delta-method
| Margin std. err. z P>|z| [95% conf. interval]
-------------------+----------------------------------------------------------------
_predict#exp3treat |
1 1 | .0641817 .013763 4.66 0.000 .0372066 .0911567
1 2 | .0804855 .0165201 4.87 0.000 .0481067 .1128643
1 3 | .1555602 .024187 6.43 0.000 .1081545 .2029658
2 1 | .1885732 .0220098 8.57 0.000 .1454348 .2317115
2 2 | .2116793 .02284 9.27 0.000 .1669138 .2564449
2 3 | .2816162 .0221867 12.69 0.000 .238131 .3251013
3 1 | .3249617 .0183643 17.70 0.000 .2889684 .360955
3 2 | .3313897 .0178992 18.51 0.000 .2963079 .3664715
3 3 | .3220353 .0185277 17.38 0.000 .2857217 .358349
4 1 | .2641419 .0221885 11.90 0.000 .2206532 .3076306
4 2 | .2452802 .0225282 10.89 0.000 .2011257 .2894347
4 3 | .1752461 .0202165 8.67 0.000 .1356225 .2148697
5 1 | .1581416 .0252592 6.26 0.000 .1086345 .2076487
5 2 | .1311653 .0230277 5.70 0.000 .0860319 .1762987
5 3 | .0655423 .0135039 4.85 0.000 .0390752 .0920094
------------------------------------------------------------------------------------
The issue I am having is this: my doctoral adviser wants me to report combined results for DV values 4 and 5 for each treatment, including combined standard errors and confidence intervals. Is there Stata syntax that will compute these values? I keep getting error messages when I try to specify more than one specific value of the dependent variable. For example, "predict(outcome(4 | 5)) gives me an r(111) error, and "predict(outcome(4) | (5))" an r(198) error. The same thing happens with "&" instead of "|" in the syntax.
Any guidance or solutions from the Stata community would be greatly appreciated. Please let me know if I need to add or clarify anything presented here, as this is my first post. Thank you in advance!
Comment