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]

st: moderated mediation logistic outcome


From   Tobias Schlager <tobias.schlager@unisg.ch>
To   statalist@hsphsun2.harvard.edu
Subject   st: moderated mediation logistic outcome
Date   Fri, 28 Oct 2011 09:57:31 +0200

Dear List 

I am encountering a problem with moderated mediation. I wanted to use 
moderated mediation as in the link below specified by Preacher et al., 
however, my dependent variable is binary. 
For this, I was trying to implement a logistic regression, however, I am 
not sure about the correct specification, because from what I know sureg 
is only for linear regression. 

Here is my specification which relates to model 1 of the link below: 
        use "x.dta", clear
        generate switch    = . 
        replace  switch = 0 if (usepurchase <= 1)
        replace  switch = 1 if (usepurchase >= 2) 
        rename switch y  /* dependent variable   */
        rename satis x     /* independent variable */
        rename dbpu m     /* mediator variable    */
        quietly summarize x
        global m=r(mean)
        global s=r(sd)
        generate mx=m*x  /*  mv by iv interaction */
        sureg (m x)(y m x mx)

It would be great if anybody knew how to do this. Thanks a lot, 
Tobias


http://www.ats.ucla.edu/stat/stata/faq/modmed.htm#model1 
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index