Good morning,
Could you please help me out in a setting a template (R syntax) to simulate power at various sample sizes for
mod3 <- '
# Model 3 PROCESS Hayes - 3way interaction
# XW, XZ, WZ, XWZ are products of predictors/moderators
Y ~ b1*X + b2*W + b3*Z + b4*XW + b5*XZ + b6*WZ + b7* XWZ
'
fit<-lavaan::sem(mod3, df, se = "boot")
X, W and Y are continouse
Z is a 2 level factor, coding experimental conditions (treatment vs control)
I fitted this model on pilot study data where a 3way interaction was hypothesized. Of course I had to manually compute product variables for interaction terms
Now I'd like to run a sample size simulation for an other study, where both Z and W will be experimental conditions (2x2 between subjects) and the effect size is expected to by small-medium.
I can't figure out, how to handle the fact that XZ, XW, ZW, XWZ are not distinct measured variables but products.
I'd appreciate your help in sorting this out.
The lab i'm working in, deals with (in Andrew Hayes PROCESS terminology) moderations (model1 and 3), simple mediation (model4 - that's easy), and moderated mediations (model 7 and model 14).
I'd love to sort out a workable simulation template for doing sample size calculations at (conservatively) low effect sizes.
Thank you