if (FALSE) {
graph <- BonferroniHolm(4)
powerReqFunc <- function(x) { (x[1] && x[2]) || x[3] }
#TODO Still causing errors / loops.
#sampSize(graph, alpha=0.05, powerReqFunc, target=0.8, mean=c(6,4,2) )
#sampSize(graph, alpha=0.05, powerReqFunc, target=0.8, mean=c(-1,-1,-1), nsim=100)
sampSize(graph, esf=c(1,1,1,1), effSize=c(1,1,1,1),
corr.sim=diag(4), powerReqFunc=powerReqFunc, target=0.8, alpha=0.05)
powerReqFunc=list('all(x[c(1,2)])'=function(x) {all(x[c(1,2)])},
'any(x[c(0,1)])'=function(x) {any(x[c(0,1)])})
sampSize(graph=graph,
effSize=list("Scenario 1"=c(2, 0.2, 0.2, 0.2),
"Scenario 2"=c(0.2, 4, 0.2, 0.2)),
esf=c(0.5, 0.7071067811865476, 0.5, 0.7071067811865476),
powerReqFunc=powerReqFunc,
corr.sim=diag(4), target=c(0.8, 0.8), alpha=0.025)
}
Run the code above in your browser using DataLab