Bookmark and Share

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

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

st: moderated mediation logistic outcome

From   Tobias Schlager <>
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, 
*   For searches and help try:

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