0 votes
481 views
in Use of WebPower by kargerm4 (120 points)
- Is it possible to calculate a power curve for multigroup mediation models in R?

- Is it possible to take account for non normal data in R when x is dichotomous?

- Is there another way to calculate power for an moderated mediation model when the moderator is continious than to use +/- 1SD of the moderator (w)? I could calculate Johnson-Neyman intervals for the x-w-y realationship and put the group split at the first significant value of the moderator for example.

Thank you and kind regards,

Alex

1 Answer

0 votes
by johnny (3.3k points)
  • Yes, you can generate a power curve for multiple group analysis, but not automatically through the wp.mc.sem.power.curve function. You can calculate the power for each sample size and then plot the curve. Below is the code used in Zhang (2013) for multiple group power analysis.  

library(bmem)

ex3model<-"

y ~ start(c(.283, .283))*x + c(c1,c2)*x + start(c(.36, .14))*m +c(b1,b2)*m

m ~ start(c(.721, .721))*x + c(a1,a2)*x

m =~ c(1,1)*m1 + start(c(.8,.8))*m2 + start(c(.8,.8))*m3

x ~~ start(c(.25, .25))*x

y ~~ start(c(.81, .95))*y

m ~~ start(c(.87, .87))*m

m1 ~~ start(c(.36, .36))*m1

m2 ~~ start(c(.36, .36))*m2

m3 ~~ start(c(.36, .36))*m3

"

indirect<-'

med1 := a1*b1

med2 := a2*b2

diffmed := a1*b1 - a2*b2

'

bootstrap<-power.boot(ex3model, indirect, nobs=c(400,200), nrep=2000, nboot=1000, parallel='multicore')

summary(bootstrap)

  • No. Currently, only continuous data are supported. If x is only used as a predictor, you might ignore it.
  • We have implemented a few calculators (from the R package pwr2ppl) based on the moderated mediation models discussed by Hayes. However, they are not fully tested yet. See here https://webpower.psychstat.org/wiki/models/index#mediation_analysis
...