Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: interaction graph


From   Fabio Zona <fabio.zona@unibocconi.it>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: interaction graph
Date   Sat, 22 Jan 2011 21:56:36 +0100 (CET)

Hi Nick,
thanks! I will try this!

But will this allow me to plot the two lines in the same graph, for comparison (such as those for interaction effects)?




----- Messaggio originale -----
Da: "Nick Cox" <njcoxstata@gmail.com>
A: statalist@hsphsun2.harvard.edu
Inviato: Sabato, 22 gennaio 2011 21:46:52 GMT +01:00 Amsterdam/Berlino/Berna/Roma/Stoccolma/Vienna
Oggetto: Re: st: interaction graph

In principle, this is easy. Just generate predictions for dummy == 1
and dummy = 0 respectively and plot the curves on a graph of y vs x.

One convenience command that will do this for you is -regplot- from
-modeldiag-. You need to type something like

regplot x, separate(dummy)

after your regression command. Download -modeldiag- from

gr0009_1 from http://www.stata-journal.com/software/sj10-1
    SJ10-1 gr0009_1.  Update: Speaking Stata: Graphing model... / Update:
    Speaking Stata: Graphing model diagnostics / by Nicholas J. Cox, Durham
    University, UK / Support:  n.j.cox@durham.ac.uk / After installation,
    type help anovaplot, indexplot, / modeldiag, ofrtplot, ovfplot, qfrplot,

That is,

. search modeldiag

in an up-to-date and clickable links within the text above will be
visible. See also the article within SJ 4(4) 2004.

Nick

On Sat, Jan 22, 2011 at 6:16 PM, Fabio Zona <fabio.zona@unibocconi.it> wrote:
> dear statalist,
>
> I have this model:
>
> Y = controls + X  + X^2   + DUMMY  +  X*DUMMY  + X^2 * DUMMY
>
> That is, a quadratic relation (X and X^2) is moderated by a dummy variable.
>
>
> I need to graph the two curves, to show the interaction effect. How can I do this in Stata?
>
> Thanks
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/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/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/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index