The next version of powerlmm (0.4.0) will soon be released, besides bug fixes this version also includes several new simulation features. In this post I will show two examples that cover the major new features.
Non-randomized comparisons are common in RCTs. In this post I show some examples of confounding and collider bias, using treatment adherence as an example. I present a small simulation study that show that common regression models used in clinical psychology, makes little sense, and that Bayesian instrumental variable regression can be easily fit using the R package brms.
Over the summer I've been working on finishing my new R package 'powerlmm', which is now almost complete. It provides flexible power calculations for typical two- and three-level longitudinal linear mixed models, with unbalanced treatment groups and cluster sizes, as well as with missing data and random slopes at both the subject and cluster-level.
This visualization illustrates the appropriate tests to use when your research hypothesis is that two treatments are equally effective, or that a new treatment is no worse than the current gold standard.