powered by
Function for sample size calculation
sampSizeCore( upperN, lowerN = floor(upperN/2), targFunc, target, tol = 0.001, alRatio, Ntype = c("arm", "total"), verbose = FALSE, ... )
Integer value n (of type numeric) with targFunc(n)-target<tol and targFunc(n)>target.
n
targFunc(n)-target<tol
targFunc(n)>target
targFunc(upperN) should be bigger than target (otherwise upperN is doubled until this is the case).
targFunc(upperN)
upperN
targFunc(lowerN) should be smaller than target (otherwise lowerN is halfed until this is the case).
targFunc(lowerN)
lowerN
The target (power) function that should be monotonically increasing in n.
The target value. The function searches the n with targFunc(n)-target<tol and targFunc(n)>target.
Tolerance: The function searches the n with targFunc(n)-target<tol and targFunc(n)>target.
Allocation ratio.
Either "arm" or "total".
"arm"
"total"
Logical, whether verbose output should be printed.
...
This function is taken from package DoseFinding under GPL from Bjoern Bornkamp, Jose Pinheiro and Frank Bretz
For details see the manual and examples.
f <- function(x){1/100*log(x)} gMCP:::sampSizeCore(upperN=1000, targFunc=f, target=0.008, verbose=TRUE, alRatio=1)
Run the code above in your browser using DataLab