This repository contains the R scripts and data used in a CLARIN-CH & LiRI workshop on statistical power analysis.
We demonstrate two common approaches to planning sample size:
- An analytic power analysis using
pwr
(for a repeated-measures ANOVA), - A simulation-based power analysis using
simr
(for a linear mixed-effects model),
which are based on an fictional study example.
File | Description |
---|---|
ANOVA_pwr_tutorial.R |
Analytic example using the pwr package |
LMM_simr_tutorial.R |
Simulation example using the simr package |
LMM_simr_results.RData |
Precomputed simulation results to avoid waiting time |
slides.pdf |
Slides used during the workshop |