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: simple slopes between continuous variable and dichotomous moderator


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: simple slopes between continuous variable and dichotomous moderator
Date   Tue, 1 Feb 2011 16:48:13 +0000 (GMT)

--- On Tue, 1/2/11, Rodrigo Isidor wrote:
> Has anyone written a program to calculate simple slopes for
> interactions between a continuous variable and dichotomous
> moderator in linear regression analysis? To my knowledge,
> sslope from Jeffrey Simons is just for continuous
> variables.

There is no need to write a program for that. You can use
Stata's factor variable notation for it. In the example 
below the first slope for mpg is for domestic cars and the
second is for foreign cars.

*------------ begin example --------------
sysuse auto, clear
reg price c.mpg#i.foreign
*------------- end example ---------------

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------


      

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