Description Usage Arguments Value Examples
View source: R/sampSizeMCTGen.R
This function build on the sampSizeMCT
function in the
DoseFinding
package, allowing the procedure to work with the
powMCTGen
function for the general case.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  sampSizeMCTGen(
family = c("negative binomial", "binomial", "poisson"),
link = c("log", "logit", "probit", "cauchit", "cloglog", "log risk ratio",
"risk ratio"),
modelPar = NULL,
theoResp = NULL,
doses = NULL,
upperN,
lowerN = floor(upperN/2),
Ntype = c("arm", "total"),
alRatio = NULL,
altModels,
alpha = 0.025,
power = 0.8,
sumFct = c("min", "mean", "max"),
verbose = FALSE,
tol = 0.001
)

family 
A character string containing the error distribution to be used in the model. 
link 
A character string for the model link function. 
modelPar 
A numeric vector containing the additional parameters for the family argument. If the family is negative binomial, the dispersion parameter should be supplied. If the family is binomial, no model parameter should be supplied. 
theoResp 
A numerical vector of theoretical response values, on the transformed scale (e.g. on the logscale for the negative binomial family). This should be the same length as the doses argument. 
doses 
A numerical vector of doses, corresponding to the theoretical response values provided. 
upperN, lowerN 
Upper and lower bound for the power sample size.

Ntype 
One of "arm", "total", or 'actual". See documentation for

alRatio 
A numeric vector specifying the ratios between the patient allocation for the specified doses. 
altModels 
An object of class 
alpha 
A numeric value specifying the significance level 
power 
A numeric value specifying the power power of 
sumFct 
Either an included character vector or a function that combines the power values under the different alternative into one value. 
verbose 
A logical specifying whether the patient allocation should be printed, in addition to the results. 
tol 
A positive numeric value specifying the tolerance level for the
bisection search algorithm. Bisection is stopped if the 
Numeric containing the calculated power values
1 2 3 4 5 6 7 8 9  dose.vec = c(0, 5, 10, 20, 30, 40)
models.full = Mods(doses = dose.vec, linear = NULL,
sigEmax = rbind(c(9, 2), c(6, 3)),
emax = 0.8,
quadratic = 0.02,
placEff = 0, maxEff = 2)
## Now we can calculate the sample sizes needed in order to achieve a certain power
sampSizeMCTGen("negative binomial", "log", modelPar = 0.1, upperN = 50, Ntype = "arm",
altModels = models.full, alpha = 0.05, sumFct = "min", power = 0.8)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.