I am trying to simulate power for the stepped wedge design using the SWSamp package. But getting errors when I try to achieve that for a binary outcome. my code is thus:
library(lme4)
library(Matrix)
library(SWSamp)
pow.bin <- sim.power(I=20, J=5, H=NULL, K=5, design='cohort', p1=0.13, b.trt=0.46, OR=0.55,
rho=0.02, family='binomial', natural.scale='logit',
sig.level=0.05, n.cores=2)
However, I get this error:
Error in { : task 1 failed - "object 'OR' not found"
Can someone assist me to solve this delima?
Thanks in anticipation