Sample size calculations
Sample size calculations
sampSize(graph, esf, effSize, powerReqFunc, target, corr.sim, alpha,
  corr.test = NULL, type = c("quasirandom", "pseudorandom"),
  upscale = FALSE, n.sim = 10000, verbose = FALSE, ...)| graph | A graph of class  | 
| esf | ... | 
| effSize | ... | 
| powerReqFunc | One power requirement function or a list of these. 
If one is interested in the power to reject hypotheses 1 and 3
one could specify:  | 
| target | Target power that should be at least achieved. Either a numeric scalar between 0 and 1 or if parameter  | 
| corr.sim | Covariance matrix under the alternative. | 
| alpha | ... | 
| corr.test | Correlation matrix that should be used for the parametric test.
If  | 
| type | What type of random numbers to use.  | 
| upscale | Logical. If  | 
| n.sim | ... | 
| verbose | Logical, whether verbose output should be printed. | 
| ... | ... | 
| test | In the parametric case there is more than one way to handle
subgraphs with less than the full alpha. If the parameter  | 
...
## Not run: 
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)
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.