Package: powertools 0.1.2

Catherine M. Crespi

powertools: Power and Sample Size Tools

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).

Authors:Catherine M. Crespi [aut, cre], Zichen Liu [aut], Kristen M. McGreevy [ctb]

powertools_0.1.2.tar.gz
powertools_0.1.2.tar.gz(r-4.5-noble)powertools_0.1.2.tar.gz(r-4.4-noble)
powertools_0.1.2.tgz(r-4.4-emscripten)powertools_0.1.2.tgz(r-4.3-emscripten)
powertools.pdf |powertools.html
powertools/json (API)

# Install 'powertools' in R:
install.packages('powertools', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/powerandsamplesize/powertools/issues

1.30 score 8 scripts 157 downloads 62 exports 69 dependencies

Last updated 6 days agofrom:38e06e135a. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 25 2024
R-4.5-linuxOKNov 25 2024

Exports:altprimaryanova1way.c.balanova1way.c.unbalanova1way.F.balanova1way.F.unbalanova2way.c.balanova2way.c.unbalanova2way.F.balanova2way.F.unbalanova2way.se.balanova2way.se.unbalcheck.manycheck.paramchisq.gofchisq.indepci.meanci.meandiffcoprimary.tcoprimary.zcorr.1sampcorr.2sampcrt.long.contcrt.means.rcrt.parallel.bincrt.parallel.contcrt.parallel.htecrt.varexplorecrt.xo.contes.anova.fes.des.fsqes.hes.qes.wirgtt.binirgtt.contirt.htematrix.formatmlrF.overallmlrF.partialms.varexploremultisite.binmultisite.contmultisite.hteprop.1sampprop.2sampprop.pairedprop.test.equivpropoddsranksumre.clustsize.binre.clustsize.contrelrisksignedranksigntestslrttest.1sampttest.2sampttest.pairedztest.1sampztest.2sampztest.paired

Dependencies:backportsbase64encbslibcachemcheckmatecliclustercolorspacecubaturedata.tabledigestevaluatefansifarverfastmapfontawesomeforeignFormulafsggplot2gluegridExtragtablehighrHmischtmlTablehtmltoolshtmlwidgetsisobandjquerylibjsonliteknitrlabelinglatticelifecyclemagrittrMASSMatrixmemoisemgcvmimemunsellmvtnormnlmennetpillarpkgconfigPowerTOSTR6rappdirsRColorBrewerRcpprlangrmarkdownrpartrstudioapisassscalesstringistringrtibbletinytexutf8vctrsviridisviridisLitewithrxfunyaml

Readme and manuals

Help Manual

Help pageTopics
Power calculation for multiple alternative (at least one) primary continuous endpoints assuming known covariance matrixaltprimary
Power calculation for one-way balanced analysis of variance contrast testanova1way.c.bal
Power calculation for one-way unbalanced analysis of variance contrast testanova1way.c.unbal
Power calculation for balanced one-way ANOVA omnibus F testanova1way.F.bal
Power calculation for unbalanced one-way analysis of variance omnibus F testanova1way.F.unbal
Power calculation for two-way balanced analysis of variance contrast testanova2way.c.bal
Power calculation for two-way unbalanced analysis of variance contrast testanova2way.c.unbal
Power calculation for two-way balanced analysis of variance F testsanova2way.F.bal
Power calculation for two-way unbalanced analysis of variance F testsanova2way.F.unbal
Power calculation for test of simple effect for two-way balanced analysis of varianceanova2way.se.bal
Power calculation for test of simple effect for two-way unbalanced analysis of varianceanova2way.se.unbal
Power calculation for chi-square goodness-of-fit testchisq.gof
Power calculation for chi-square test of independencechisq.indep
Power calculation for precision analysis (confidence interval) for one meanci.mean
Power calculation for precision analysis (confidence interval) for a difference between two meansci.meandiff
Power calculations for multiple co-primary continuous endpoints assuming unknown covariance matrixcoprimary.t
Power calculations for multiple co-primary continuous endpoints assuming known covariance matrixcoprimary.z
Power calculation for test of one correlation coefficientcorr.1samp
Power calculation for comparing two correlation coefficientscorr.2samp
Power for test of treatment effect in longitudinal cluster randomized trial with baseline measurementcrt.long.cont
Correlation between a cluster mean at baseline and follow upcrt.means.r
Power calculation for cluster randomized trial with binary outcomecrt.parallel.bin
Power for cluster randomized trial with continuous outcomecrt.parallel.cont
Power for detecting treatment effect heterogeneity in a cluster randomized trial with a continuous outcomecrt.parallel.hte
Variance exploration for cluster randomized trials with binary outcomescrt.varexplore
Power for test of treatment effect in 2x2 crossover cluster randomized trialcrt.xo.cont
Cohen f effect size calculation for one- or two- way analysis of variancees.anova.f
Cohen d effect size calculation for one or two meanses.d
Cohen f-squared effect size for overall F test in multiple linear regressiones.fsq
Cohen h effect size calculation for two proportionses.h
Cohen q effect size calculation for two correlation coefficientses.q
Cohen w effect size calculation for chi-square testses.w
Power for individual randomized group treatment trial with binary outcomeirgtt.bin
Power for individually randomized group treatment trial with continuous outcomeirgtt.cont
Power for detecting treatment effect heterogeneity in an individually randomized trial with a continuous outcomeirt.hte
Power calculation for a multiple linear regression overall F testmlrF.overall
Power calculation for a multiple linear regression partial F testmlrF.partial
Variance exploration for a multisite trial with a binary outcomems.varexplore
Power for a multisite trial with a binary outcomemultisite.bin
Power for test of average treatment effect in a multisite trialmultisite.cont
Power for test of heterogeneity of treatment effect in a multisite trialmultisite.hte
Power calculation for one-sample proportion testprop.1samp
Power calculation for two-sample proportion testprop.2samp
Power calculation for McNemar test of two correlated proportionsprop.paired
Power calculation for test of equivalence of two proportionsprop.test.equiv
Power calculations for ordinal categorical variable under proportional odds assumptionpropodds
Power calculation for rank-sum testranksum
Relative efficiency of a cluster randomized trial with binary outcome with varying cluster sizesre.clustsize.bin
Relative efficiency of a cluster randomized trial with continuous outcome with varying cluster sizesre.clustsize.cont
Power calculation for relative riskrelrisk
Power calculation for signed-rank testsignedrank
Power calculation for sign testsigntest
Power calculation for a simple linear regressionslr
Power calculation for one-sample t testttest.1samp
Power calculation for two-sample t testttest.2samp
Power calculation for paired t testttest.paired
Power calculation for one-sample z testztest.1samp
Power calculation for two-sample z testztest.2samp
Power calculation for paired z testztest.paired