Power and Sample Size in R

A website for all things power and sample size in R

Book

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.

Order at Amazon or through the publisher.

Who is this book for?

The book is designed as a learning tool for students as well as a resource for experienced statisticians and investigators. It begins by explaining the process of power calculation step by step at an introductory level and then builds to increasingly complex and varied topics.

Integration with R

The book demonstrates calculations in R using powertools and other R packages. Only a basic proficiency in R is assumed.

Topics include:

  • Means
  • Proportions
  • ANOVA, including contrasts and multiple comparisons
  • Noninferiority, superiority and equivalence studies
  • Power for confidence intervals (precision)
  • Multistage designs
  • Correlation
  • Linear, logistic and Poisson regression
  • Crossover studies
  • Multicenter trials
  • Cluster randomized trials, including stepped wedge designs
  • Time to event outcomes
  • Multiple primary endpoints

For each type of study design, the information needed to perform a calculation and the factors that affect power are explained.

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.

About the Author

Catherine M. Crespi, Ph.D., is Professor in the Department of Biostatistics at the Jonathan and Karin Fielding School of Public Health, University of California Los Angeles. Her areas of specialization include trial design and analysis, multilevel modelling, longitudinal data and multivariate statistics. She is a Fellow of the American Statistical Association with over 200 peer-reviewed publications.

Found a typo? Have a suggestion?

Email me at [email protected]

Book errata

  • Page 113: In Example 5.13, the R code needs to include the argument “sides = 1”.
  • Page 177: In Example 10.1, change “H_0: rho > 0.2” to “H_A: rho > 0.2”.
  • Page 191: In Example 10.11, the R code needs to include the argument “q = 1”. (This is being fixed in the next package update.)
  • Page 321-322: In Example 17.4, the function coprimary.t does not require the arguments min.n and max.n.