Description Usage Arguments Value Author(s) References Examples

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

1 |

`outcome` |
String. Type of outcome. Options are |

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

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

Gianluca Baio

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.

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.