Learn R Programming

SteppedPower - Power Calculation for Stepped Wedge Designs

SteppedPower offers tools for power and sample size calculation as well as design diagnostics for longitudinal mixed model settings, with a focus on stepped wedge designs. All calculations are oracle estimates i.e. assume random effect variances to be known (or guessed) in advance.

Installation

Install from CRAN with install.packages("SteppedPower"). Current version on CRAN is 0.3.2.

To install the latest stable version type
devtools::install_github("PMildenb/SteppedPower", build_vignettes=TRUE)

The development version with the most recent changes can be installed with devtools::install_github("PMildenb/SteppedPower", ref='devel', build_vignettes=TRUE)

Vignette

The vignette can be viewed with vignette("Getting_Started", package="SteppedPower")

Copy Link

Version

Install

install.packages('SteppedPower')

Monthly Downloads

574

Version

0.3.4

License

MIT + file LICENSE

Maintainer

Philipp Mildenberger

Last Published

September 13th, 2023

Functions in SteppedPower (0.3.4)

plot.DesMat

plot.DesMat
print.DesMat

print.DesMat
tTestPwr

Compute Power of a Wald Test
print.glsPower

Print an object of class `glsPower`
compute_glsPower

Compute power via weighted least squares
RandEff_to_alpha012

Correlation structure: transform random effects to alpha
construct_CovMat

Construct a Covariance Matrix
alpha012_to_RandEff

Correlation structure: transform alpha to random effects
construct_CovSubMat

Construct a Block of the Covariance Matrix
VarClosed_Li

Closed formula for treatment variance, with proportional decay
SteppedPower-pkg

SteppedPower
construct_CovBlk

Construct a Single Block of the Covariance Matrix
compute_InfoContent

Title Formula-based calculation of information content
VarClosed_Kasza

Closed formula for treatment variance in open cohort settings
glsPower

Compute power via weighted least squares
construct_DesMat

Construct the Design Matrix
construct_incompMat

Constructs a matrix of `NA` and `1` for unobserved and observed cluster periods, respectively.
plot_InfoContent

plot the information content of a gls object
plot_CovMat

Visualise a Covariance Matrix
construct_timeAdjust

Construct the time period adjustment in the design matrix
construct_trtMat

Construct Treatment Matrix
plot.glsPower

plot an object of class `glsPower`
plot_CellWeights

plot cell contributions (weights) of a gls object