Chapman and Hall/CRC, 2025. — 354 p. — (Chapman & Hall/CRC Biostatistics Series). — ISBN: 978-0-429-48878-8.
Power and Sample Size in R guides the reader through power and sample size calculations for a wide variety of study outcomes and designs and illustrates their implementation in R software. It is designed to be used as a learning tool for students as well as a resource for experienced statisticians and investigators.
The book begins by explaining the process of power calculation step by step at an introductory level and then builds to increasingly complex and varied topics. For each type of study design, the information needed to perform a calculation and the factors that affect power are explained. Concepts are explained with statistical rigor but made accessible through intuition and examples. Practical advice for performing sample size and power calculations for real studies is given throughout.
The book demonstrates calculations in R. It is integrated with the companion R package powertools and also draws on and summarizes the capabilities of other R packages. Only a basic proficiency in R is assumed.
Topics include comparison of group means and proportions; ANOVA, including multiple comparisons; power for confidence intervals; multistage designs; linear, logistic and Poisson regression; crossover studies; multicenter, cluster randomized and stepped wedge designs; and time to event outcomes. Chapters are also devoted to designing noninferiority, superiority by a margin and equivalence studies and handling multiple primary endpoints.
By emphasizing statistical thinking about the factors that influence power for different study designs and outcomes as well as providing R code, this book equips the reader with the knowledge and tools to perform their own calculations with confidence.
Key Features:
Explains power and sample size calculation for a wide variety of study designs and outcomes.
Suitable for both students and experienced researchers.
Highlights key factors influencing power and provides practical tips for designing real studies.
Includes extensive examples with R code.
Preamble.
List of Figures.
List of Tables.
Preliminaries.
R implementation.
Probability distributions.
Notation for common distributions.
R functions for common distributions.
Symmetric property of the normal distribution.
Standardizing a normal distribution.
Getting started: a first calculation.
Steps in a sample size calculation.
Hypothesis testing.
A first calculation: one-sample z test.
Effect size.
Minimum detectable effect size.
A general formula when the test statistic is normally distributed.
R function for z tests.
Sample size adjustments.
Sensitivity analysis.
Estimating power using simulation.
Should I conduct a power analysis after my study is completed?
One or two means.
One-sample t test.
Two independent samples t test.
Relative efficiency.
Lognormal data.
Paired t test.
Remarks on R functions for t tests.
Nonparametric tests of location.
Hypotheses for different study objectives.
Introduction.
Test for nonequality.
Test for superiority.
Test for noninferiority.
Test for superiority by a margin.
Test for equivalence.
Hypotheses when a lower mean corresponds to a better outcome.
Remarks.
Analysis of variance for comparing means.
Introduction.
One-way analysis of variance.
Two-way analysis of variance.
Analysis of covariance.
Additional resources.
Proportions: large sample methods.
Preliminaries.
One-sample proportion test.
Test of two independent proportions.
Test for two correlated proportions.
Exact methods for proportions.
One proportion: exact binomial test.
Two-stage designs for single arm trials.
Two proportions: Fisher exact tes.
Two correlated proportions: exact test.
Categorical variables.
Chi-square goodness-of-fit test.
Chi-square test of independence.
Chi-square test for comparing two proportions.
Ordinal categorical responses.
Additional resources.
Precision and confidence intervals.
Introduction.
Confidence intervals for means.
Confidence intervals for proportions.
Confidence intervals for relative risk.
Confidence intervals for odds ratio.
Additional resources.
Correlation and linear regression.
Pearson correlation coefficient.
Simple linear regression.
Multiple linear regression.
Generalized linear regression.
Power for generalized linear models.
Logistic regression.
Poisson regression.
Additional resources.
Crossover studies.
Introduction.
2 × 2 crossover design.
(2 × 2)r crossover design.
Efficiency of crossover designs.
Additional resources.
Multisite trials.
Introduction.
Multilevel data structure.
Considerations for multisite trials.
Model for continuous outcomes.
Intraclass correlation coefficient.
Power for test of average treatment effect.
Power for test of heterogeneity of treatment effect.
Binary outcomes.
Additional resources.
Cluster randomized trials: parallel designs.
Introduction.
Continuous outcomes.
Binary outcomes.
Additional resources for parallel cluster randomized trials.
ndividually randomized group treatment trials.
Other multilevel trial designs.
Cluster randomized trials: longitudinal designs.
Introduction.
Modeling framework for continuous outcomes.
Parallel cluster randomized trial with baseline measurement.
Cluster randomized crossover designs.
Stepped wedge designs.
Time to event outcomes.
Introduction.
Concepts for time to event studies.
Logrank test.
Tests based on the Kaplan-Meier estimator.
Distributions for survival, accrual and loss to follow up.
Additional resources.
Multiple primary endpoints.
Introduction.
Model.
Co-primary endpoints.
Alternative primary endpoints.
Additional resources.
Bibliography.
Index.