Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Nikolaos Pandis <npandis@yahoo.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: contrasts |
Date | Mon, 1 Oct 2012 13:02:19 -0700 (PDT) |
Dear Jeff, Thank you for the suggestion. marginsplot after : margins r.wiretype,contrast looks neater compared to: margins wiretype, pwcompare BW, Nick From: Jeff Pitblado <jpitblado@stata.com> To: statalist@hsphsun2.harvard.edu Sent: Monday, October 1, 2012 7:00 PM Subject: Re: st: contrasts Nikolaos Pandis <npandis@yahoo.com> asks about plotting pairwise comparisons of margins: > I am running the following command: > > reg force i.wiretype //wiretype has 3 levels > > then I would like to get the contrasts (2 vs. 1, 3 vs.1 and 3 vs.2) and plot via marginsplot. > > margins r.wiretype,contrast > > marginsplot,yline(0) > > I can get the 2 contrasts with the baseline but I cannot get the last 3 vs. 2 contrast within the same command so I can include all 3 contrasts in the marginsplot. Instead of contrasts of the margins, . margins r.wiretype, contrast Nick can use the -pwcompare- option to get the pairwise comparisons of the margins, . margins wiretype, pwcompare -- --Jeff Pitblado jpitblado@stata.com * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/