Announcement

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

  • conditional effect in moderated mediation bootstrap command

    Hello,

    I am trying to test the conditional indirect effect in a mediated moderation model using bootstrapping. I have a multilevel model and this is the code i am using:

    Code:
    capture program drop bootm
    program bootm, rclass
      mixed stdROA X M MW
      return scalar cielw = (-0.241*(_b[stdROA:M] + (0)*_b[stdROA:M#W] ))
      return scalar ciemn = (-0.241*(_b[stdROA:M] + (0.5)*_b[stdROA:M#W] ))
      return scalar ciehi = (-0.241*(_b[stdROA:M] + (2)*_b[stdROA:M#W] ))
    end
    
    bootstrap r(cielw) r(ciemn) r(ciehi), reps(5000)
    Bootstrap does not execute and says "r(cielw) command not found".

    What am i missing?

    Thank you!

  • #2
    Thank you. I solved it by consulting this post, which described a problem I also experienced.
    bootstrap command :insufficient observations to compute bootstrap standard errors no results will be save - Statalist

    Comment

    Working...
    X