Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multilevel conditional indirect effects with multiple moderators

    Dear Forumgoers,

    I have a multilevel model for which I am trying to calculate indirect effects across two moderators. One of them is continuous and the other is dichotomous (i.e., female or male) I am trying to basically check the indirect effects at +/- 1 standard deviation of a moderator for each men and women. When I add the parameter to distinguish gender though, I get identical estimates at +/- 1 s.d. for one of the genders. How can I get the indirect effects at +/- 1 s.d. of the moderator "M" for men and for women? A simplified version of my code is below. The moderator and gender are level 2, X and the mediator are at level 1 (within-person). I am trying to keep this as simple as I can but I can answer questions if it's helpful.

    Code:
    gsem (y  <- c.x_level2##c.mod##i.female M1[id]) (mediator <- c.x_level1.##c.mod##i.female M1[id]), latent(M1)
    
            quietly sum mod
            global m=r(mean)
            global s=r(sd)
    
    nlcom (_b[mediator:x_level1] + ($m-$s)*_b[mediator:c.mod#c.x_level1#1.female])*_b[y:mediator]
    nlcom (_b[mediator:x_level1] + ($m+$s)*_b[mediator:c.mod#c.x_level1#1.female])*_b[y:mediator]
    nlcom (_b[mediator:x_level1] + ($m-$s)*_b[mediator:c.mod#c.x_level1#0.female])*_b[y:mediator]
    nlcom (_b[mediator:x_level1] + ($m+$s)*_b[mediator:c.mod#c.x_level1#0.female])*_b[y:mediator]
    So in this case, I get what appear to be reasonable estimates for the first two conditional effects (i.e. for women) but the second two are completely identical. I have tried some other solutions like changing the baseline category, splitting gender into two indicator variables, or recoding gender to 1/2 instead of 0/1, but I run into similar issues. Any suggestions?
    Last edited by Matt Piszczek; 20 Dec 2023, 09:05.
Working...
X