set.seed(2006)
response <- sample(0:1,60,replace=TRUE)
# Comparison to p=0.5
wald.ptheo.test(response)
# Comparison to p=0.8
wald.ptheo.test(response,p=0.8)
# With a blocking factor
require(lme4)
blocks <- gl(3,20)
wald.ptheo.test(response,blocks)
Run the code above in your browser using DataLab