Post-hoc power for a hierarchical cell-based assay
Source:R/statistics-power.R
cr_power_analysis.RdA Monte-Carlo approximation of the power of a two-sample comparison
that accounts for the hierarchical structure (cells nested within
replicate units). Used mainly for reporting; for sizing a follow-up
study use cr_power(), which inverts the design analytically.
Usage
cr_power_analysis(
effect_size,
n_replicates,
n_cells_per_rep,
alpha = 0.05,
test = "t_test",
n_sim = 500,
seed = NULL
)Arguments
- effect_size
Cohen's d at the cell level.
- n_replicates
Number of replicate units per group.
- n_cells_per_rep
Cells per replicate unit.
- alpha
Type I error rate.
- test
Only
"t_test"is implemented.- n_sim
Number of simulations (default 500).
- seed
Optional integer seed. The caller's random number stream is restored on exit.
See also
Other power:
cr_conservative_effect(),
cr_power(),
cr_power_grid()