powertools1.0.0 package

Power and Sample Size Tools

ci.meandiff

Power calculation for precision analysis (confidence interval) for a d...

coprimary.t

Power calculations for multiple co-primary continuous endpoints assumi...

coprimary.z

Power calculations for multiple co-primary continuous endpoints assumi...

corr.1samp

Power calculation for test of one correlation coefficient

corr.2samp

Power calculation for comparing two correlation coefficients

crt.long.cont

Power for test of treatment effect in longitudinal cluster randomized ...

crt.means.r

Correlation between a cluster mean at baseline and follow up

es.anova.f

Cohen f effect size calculation for one- or two- way analysis of varia...

es.d

Cohen d effect size calculation for one or two means

es.fsq.overall

Cohen f-squared effect size for overall F test in multiple linear regr...

altprimary

Power calculation for multiple alternative (at least one) primary cont...

anova1way.c.bal

Power calculation for one-way balanced analysis of variance contrast t...

anova1way.c.unbal

Power calculation for one-way unbalanced analysis of variance contrast...

anova1way.F.bal

Power calculation for balanced one-way ANOVA omnibus F test

anova1way.F.unbal

Power calculation for unbalanced one-way analysis of variance omnibus ...

anova2way.c.bal

Power calculation for two-way balanced analysis of variance contrast t...

anova2way.c.unbal

Power calculation for two-way unbalanced analysis of variance contrast...

anova2way.F.bal

Power calculation for two-way balanced analysis of variance F tests

anova2way.F.unbal

Power calculation for two-way unbalanced analysis of variance F tests

anova2way.se.bal

Power calculation for test of simple effect for two-way balanced analy...

anova2way.se.unbal

Power calculation for test of simple effect for two-way unbalanced ana...

check.many

Internal-use function for quality checking sets of parameters

check.param

Internal-use function for quality checking individual parameters

chisq.gof

Power calculation for chi-square goodness-of-fit test

chisq.indep

Power calculation for chi-square test of independence

ci.mean

Power calculation for precision analysis (confidence interval) for one...

crt.parallel.bin

Power calculation for cluster randomized trial with binary outcome

crt.parallel.cont

Power for cluster randomized trial with continuous outcome

crt.parallel.hte

Power for detecting treatment effect heterogeneity in a cluster random...

crt.varexplore

Variance exploration for cluster randomized trials with binary outcome...

crt.xo.cont

Power for test of treatment effect in 2x2 crossover cluster randomized...

es.fsq.partial

Cohen f-squared effect size for partial F test in multiple linear regr...

es.h

Cohen h effect size calculation for two proportions

es.q

Cohen q effect size calculation for two correlation coefficients

es.w

Cohen w effect size calculation for chi-square tests

irgtt.bin

Power for individual randomized group treatment trial with binary outc...

irgtt.cont

Power for individually randomized group treatment trial with continuou...

irt.hte

Power for detecting treatment effect heterogeneity in an individually ...

matrix.format

Internal-use function for displaying matrices in function outputs

mlrF.overall

Power calculation for a multiple linear regression overall F test

mlrF.partial

Power calculation for a multiple linear regression partial F test

ms.varexplore

Variance exploration for a multisite trial with a binary outcome

multisite.bin

Power for a multisite trial with a binary outcome

multisite.cont

Power for test of average treatment effect in a multisite trial

multisite.hte

Power for test of heterogeneity of treatment effect in a multisite tri...

prop.1samp

Power calculation for one-sample proportion test

prop.2samp

Power calculation for two-sample proportion test

prop.paired

Power calculation for McNemar test of two correlated proportions

prop.test.equiv

Power calculation for test of equivalence of two proportions

propodds

Power calculations for ordinal categorical variable under proportional...

ranksum

Power calculation for rank-sum test

ttest.paired

Power calculation for paired t test

re.clustsize.bin

Relative efficiency of a cluster randomized or multisite trial with bi...

re.clustsize.cont

Relative efficiency of a cluster randomized or multisite trial with co...

relrisk

Power calculation for relative risk

safe.uniroot

Internal-use wrapper for catching errors induced by stats::uniroot

signedrank

Power calculation for signed-rank test

signtest

Power calculation for sign test

slr

Power calculation for a simple linear regression

ttest.1samp

Power calculation for one-sample t test

ttest.2samp

Power calculation for two-sample t test

ztest.1samp

Power calculation for one-sample z test

ztest.2samp

Power calculation for two-sample z test

ztest.paired

Power calculation for paired z test

Power and sample size calculations for a variety of study designs and outcomes. Methods include t tests, ANOVA (including tests for interactions, simple effects and contrasts), proportions, categorical data (chi-square tests and proportional odds), linear, logistic and Poisson regression, alternative and coprimary endpoints, power for confidence intervals, correlation coefficient tests, cluster randomized trials, individually randomized group treatment trials, multisite trials, treatment-by-covariate interaction effects and nonparametric tests of location. Utilities are provided for computing various effect sizes. Companion package to the book "Power and Sample Size in R", Crespi (2025, ISBN:9781138591622). Further resources available at <https://powerandsamplesize.org/>.

  • Maintainer: Catherine M. Crespi
  • License: MIT + file LICENSE
  • Last published: 2025-11-15