Skip to content

Instantly share code, notes, and snippets.

View ericpgreen's full-sized avatar

Eric Green ericpgreen

View GitHub Profile
@ericpgreen
ericpgreen / steppedwedgeR.R
Last active December 20, 2015 23:29
power calculator for stepped wedge designs
# Calculation of power for stepped wedge design
# Adapted from an excel-based calculator from Jim Hughes, [email protected]
# see http://faculty.washington.edu/peterg/Vaccine2006/articles/HusseyHughes.2007.pdf
# http://faculty.washington.edu/jphughes/Power%20for%20stepped%20wedge.xls
# http://faculty.washington.edu/jphughes/Power%20for%20stepped%20wedge%20(mean).xls
# Adapted by Eric Green, [email protected], @ericpgreen
# (1) enter or (2) import design matrix ===========================================================
# skip option 1 if using option 2, and vice versa
# power.p is the final object of interest for proportions