DE.woert: Computes the Design Effect for a Stepped Wedge Trial

Description Usage Arguments Value Author(s) References Examples

View source: R/SWSamp.R

Description

Sample size calculations for a SWT using a cross-sectional design. This is based on (the correct version) of Woertman et al (2013), as described in Baio et al (2015).

Usage

1
DE.woert(outcome = "cont", input, K, J, B = 1, T = 1, rho, sig.level = 0.05, power = 0.8)

Arguments

outcome

String. Type of outcome. Options are cont, bin or count

input

input = a list containing the arguments. This differs depending on the type of outcome, as follows: - continuous outcome: 1) delta (treatment effect) 2) sd (standard deviation) - binary outcome: 1) p1 (baseline probability of outcome) 2) either p2 (treatment probability of outcome), or OR (treatment effect as OR) - count outcome: 1) r1 (baseline rate of outcome) 2) either r2 (treatment rate of outcome), or RR (treatment effect as RR)

K

average cluster size

J

number of time points (excluding baseline)

B

number of baseline measurement times

T

number of measurement times during each crossover

rho

ICC

sig.level

significance level (default = 0.05)

power

Power (default = 0.8)

Value

n.cls.swt

Number of clusters required to reach the pre-specified power with the given significance level.

n.pts

The total number of participants required.

DE.woert

The resulting Design Effect.

CF

The resulting Correction Factor.

n.rct

The original individual RCT sample required to reach the pre-specified power with the given significance level.

Author(s)

Gianluca Baio

References

Baio, G; Copas, A; Ambler, G; Hargreaves, J; Beard, E; and Omar, RZ Sample size calculation for a stepped wedge trial. Trials, 16:354. Aug 2015.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Continuous outcome
input <- list(delta=-0.3875,sd=1.55)
K <- 20
J <- 5
rho <- .2
DE.woert(input=input,K=K,J=J,rho=rho)
#
# Binary outcome
input <- list(OR=.53,p1=.26)
DE.woert(outcome="bin",input=input,K=K,J=J,rho=rho)
#
# Count outcome
input <- list(RR=.8,r1=1.5)
DE.woert(outcome="count",input=input,K=K,J=J,rho=rho)

giabaio/SWSamp documentation built on July 15, 2017, 4:22 a.m.