rpsychologist / powerlmm

powerlmm R package for power calculations for two- and three-level longitudinal multilevel/linear mixed models.
101 stars 13 forks source link

Allow comparison of more than two models when simulating #2

Closed rpsychologist closed 6 years ago

rpsychologist commented 7 years ago

Currently simulate(object, formula = formula) only allows at most two different formulas, in a named list with the names "correct" or "wrong". It would be better to allow custom names and any number of formulas. eg

f <- list("3_lvl_correct" = "y ~ treatment * time + (1 + time | subject) + (time | cluster)",
             "3_lvl_no_cor" = "y ~ treatment * time + (1 + time | subject) +  (time || cluster)",
             "2_lvl" = "y ~ treatment * time + (1 + time | subject)"
)