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 <[email protected]>
To   [email protected]
Subject   Re: st: interaction graph
Date   Wed, 23 Feb 2011 10:34:07 +0100 (CET)

Hi ,
time ago you suggested to use 

regplot x, separate(dummy)

to graph interaction effect between a continuous variable and a dummy variable.


However, what command should I use if I have 
a) a quadratic form (i.e.,   x  +  x_square)
b) the moderator is a continous variable (not a dummy), and it is multiplied by both x  and  x-square ??

The stata command "interact" works only with linear (i.e. non quadratic) models

Thanks

Fabio











----- Messaggio originale -----
Da: "Nick Cox" <[email protected]>
A: [email protected]
Inviato: Domenica, 23 gennaio 2011 15:07:56 GMT +01:00 Amsterdam/Berlino/Berna/Roma/Stoccolma/Vienna
Oggetto: Re: st: interaction graph

Yes.

On Sat, Jan 22, 2011 at 8:56 PM, Fabio Zona <[email protected]> wrote:
> 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" <[email protected]>
> A: [email protected]
> 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:  [email protected] / 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 <[email protected]> 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/
>

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