Description Usage Arguments Value Author(s) References Examples

Sample size calculations for binary outcomes based on the formula provided by Hussey and Hughes (2007)

1 |

`p1` |
Baseline probability of the outcome (for the controls) |

`OR` |
Value of the expected Odds Ratio (for the intervention vs control) |

`I` |
Number of clusters |

`J` |
Number of time points |

`K` |
Average size of each cluster |

`rho` |
Intra-class correlation coefficient (default=0) |

`sig.level` |
Significance level (default=0.05) |

`which.var` |
String character specifying which variance to be considered (options are the
default value |

`X` |
A design matrix for the stepped wedge design, indicating the time at which each of the clusters should switch the active intervention. By default is NULL and automatically computed, but can be passed as an extra argument as a user-defined matrix with I rows and (J+1) columns |

`power` |
The resulting power |

`sigma.y` |
The estimated total (marginal) sd for the outcome |

`sigma.e` |
The estimated residual sd |

`sigma.a` |
The resulting cluster-level sd |

`setting` |
A list including the following values: - n.clusters = The number of clusters - n.time.points = The number of 'active' time points - avg.cluster.size = The average cluster size - design.matrix = The design matrix for the SWT under consideration |

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.

Hussey M and Hughes J. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials. 28(2):182-91. Epub 2006 Jul 7. Feb 2007

1 |

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

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.