Package: stepwedgepower
Type: Package
Title: Simulation-Based Power Evaluation for Stepped-Wedge Cluster
        Randomized Trials
Version: 0.4.1
Authors@R: c(
    person(given = "Lin (Amanda)", family = "Li", role = c("aut", "cre"),
           email = "amandali14124277@gmail.com"),
    person(given = "Florin", family = "Vaida", role = "aut",
           comment = c(degree = "PhD"))
  )
Description: Provides simulation-based power, type I error, and operating-
    characteristic evaluation for stepped-wedge cluster randomized trials.
    General binary-outcome designs support arbitrary crossover schedules,
    unequal clusters per sequence, secular trends, flexible cluster-period
    sizes, reproducible parallel execution, sensitivity grids, and mixed-model
    diagnostics. A component-based engine supports the four treatment states
    Control, A, B, and A+B under arbitrary asynchronous schedules, including
    structurally unobserved cluster-periods, withdrawal, reintroduction,
    wash-in delays, user-defined carryover decay, component main effects, an
    A-by-B interaction, estimability audits, multiplicity adjustment,
    conditional and failure-aware power, and explicit classification of hard
    model errors, nonconvergence, non-finite contrasts, singular fits, and
    successful fits. A batch-aware interface represents classic and batched
    stepped-wedge designs with delayed cluster initiation, structurally
    unobserved cluster-periods, and calendar-time, time-on-trial, or separate
    batch-specific time effects, following Kasza, Bowden, Hooper and Forbes
    (2022) <doi:10.1002/sim.9438>. The cumulative Control-to-A-to-A+B interface
    from earlier versions remains available. The design and mixed-effects
    analysis follow Hussey and Hughes
    (2007) <doi:10.1016/j.cct.2006.05.007>. Intraclass correlations for binary
    outcomes are converted to random-intercept standard deviations on the
    latent scale of the logistic-normal model, as reviewed by Eldridge,
    Ukoumunne and Carlin (2009) <doi:10.1111/j.1751-5823.2009.00092.x>. Monte
    Carlo uncertainty is reported using exact intervals from Clopper and
    Pearson (1934) <doi:10.1093/biomet/26.4.404>.
URL: https://github.com/AmandaLinLi/stepwedgepower
BugReports: https://github.com/AmandaLinLi/stepwedgepower/issues
License: MIT + file LICENSE
Encoding: UTF-8
Imports: lme4, lifecycle, graphics, grDevices, stats, parallel, utils
Suggests: testthat (>= 3.0.0), knitr, rmarkdown, swCRTdesign, swdpwr
VignetteBuilder: knitr
Config/testthat/edition: 3
Config/roxygen2/version: 8.1.1
NeedsCompilation: no
Packaged: 2026-10-17 18:26:21 UTC; amandalinli
Author: Lin (Amanda) Li [aut, cre],
  Florin Vaida [aut] (degree: PhD)
Maintainer: Lin (Amanda) Li <amandali14124277@gmail.com>
Repository: CRAN
Date/Publication: 2026-10-17 22:40:10 UTC
