Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: graphing a 3 way interaction with mi data


From   Tomeka Davis <tmdavis@gsu.edu>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: graphing a 3 way interaction with mi data
Date   Fri, 1 Feb 2013 14:46:14 +0000

Thanks Scott.  Without the benefit of Stata 12 (only Stata 11, which doesn't have -marginsplot-), is there any way I could use -margins- along with another graphing command other than -marginsplot-? 

Tomeka 

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Scott Merryman
Sent: Thursday, January 31, 2013 10:56 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: graphing a 3 way interaction with mi data

On Thu, Jan 31, 2013 at 2:09 PM, Tomeka Davis <tmdavis@gsu.edu> wrote:
> mi estimate, saving (miest): svy: logit private race ses povrate 
> race_ses ses_povrate race_ses_povrate
>
> However, I am not clear on how to generate a graph plotting the predicted probability of private school attendance by race, ses, and poverty rate, particularly after the mi command.

This may not be too helpful as -margins- is not available after -mi estimate-, however it is easy to plot continuous by continuous by categorical interactions using -margins- and -marginsplot-.

For example:

sysuse nlsw88.dta,clear
logit married ibn.race ibn.race#(c.wage c.grade c.wage#c.grade), nocon margins race, at(grade=(0(6)18) wage = (10(10)40)) marginsplot , bydim(race) plotdimension(grade, allsimple)
legend(subtitle(Education) rows(1)) byopts(rescale) noci

This example is adapted from Michael Mitchell's Interpreting and Visualizing Regression Models Using Stata, chapter 13  "Continuous by continuous by categorical interactions"

Scott
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index