sampSize {MCPMod}R Documentation

Sample size calculations for MCPMod

Description

Given a candidate set, the baseline effect, the maximum effect and the standard deviation, the sampSize function returns the smallest sample size achieving a certain combined power value. See Pinheiro et al. (2006) for details.

Usage

sampSize(models, doses, base, maxEff, sigma, upperN,
         lowerN = floor(upperN/2), power = 0.8, alRatio = NULL,
         sumFct = mean, off = 0.1*max(doses), scal = 1.2 * max(doses),
         alpha = 0.025, twoSide = FALSE, tol = 0.001, verbose = FALSE,
         control = mvtnorm.control(), muMat = NULL,
         typeN = c("arm", "total"), ...)

Arguments

models

A list specifying the candidate models. This can also be a fullMod object, then the arguments base, maxEff, off and scal are ignored

doses

Dose levels to be administered

base

Expected baseline effect

maxEff

Expected maximum change from baseline

sigma

Expected standard deviation

upperN, lowerN

Upper and lower bound for the target sample size. lowerN defaults to floor(upperN/2).

power

Desired combined power value, defaults to 0.8.

alRatio

Vector describing the relative patient allocations to the dose groups. See Examples below.

sumFct

A function to combine the power values under the different models into one value. By default the arthmetic mean is used.

off

Offset parameter for the linear in log model (default 10 perc. of maximum dose).

scal

Scale parameter for the beta model (default 20 perc. larger than maximum dose).

alpha

Level of significance (default: 0.025)

twoSide

Logical indicating whether a two sided or a one-sided test is performed. By default FALSE, so one-sided testing.

tol

A positive numeric value specifying the tolerance level for the bisection search algorithm.

verbose

Logical value indicating if a trace of the iteration progress of the bisection search algorithm should be displayed.

control

A list of options for the pmvt and qmvt functions as produced by mvtnorm.control

muMat

An optional matrix with means as columns and given dimnames (dose levels and names of contrasts). If specified the the models argument should not be specified, see examples below.

typeN

One of "arm" or "total". Determines, whether the sample size in the smallest arm or the total sample size is iterated in bisection search algorithm. See examples below.

...

Possible additional arguments for sumFct

Details

Calculates the sample size necessary to achieve a desired combined power value for the multiple contrast test. A summary function is used to combine the individual power values. The allocation ratios for the dose groups need to be predefined and fixed (by default balanced allocations are assumed).

The function implements a simple bisection search algorithm to determine the target sample size. In case the upper and lower bound (upperN, lowerN) do not contain the target sample size the algorithm automatically adjusts these boundaries, but outputs a warning message.

Value

An object of class sampSize, with the following components:

samp.size

Vector of target sample size(s)

approx.power

Combined Power achieved under the assumed scenario and sample size.

References

Bornkamp B., Pinheiro J. C., and Bretz, F. (2009). MCPMod: An R Package for the Design and Analysis of Dose-Finding Studies, Journal of Statistical Software, 29(7), 1–23

Pinheiro, J. C., Bornkamp, B., and Bretz, F. (2006). Design and analysis of dose finding studies combining multiple comparisons and modeling procedures, Journal of Biopharmaceutical Statistics, 16, 639–656

See Also

powCalc, powerMM

Examples

## Not run: 
# example from JBS paper p.651
doses <- c(0,10,25,50,100,150)                                         
models <- list(linear = NULL, emax = c(25),                            
               logistic = c(50, 10.88111), exponential=c(85),          
               betaMod=matrix(c(0.33,2.31,1.39,1.39), byrow=TRUE, nrow=2))
sampSize(models, doses, base = 0, maxEff = 0.4, sigma = 1,             
         upperN = 80, scal = 200, alpha = 0.05)
# with different summary function

sampSize(models, doses, base = 0, maxEff = 0.4, sigma = 1,             
         upperN = 90, scal = 200, sumFct = median, alpha = 0.05)

# with unbalanced allocations (twice as many patients in placebo group
# than in active dose groups)
sampSize(models, doses, base = 0, maxEff = 0.4, sigma = 1,            
       alpha = 0.05, upperN = 80, scal = 200, alRatio=c(2,1,1,1,1,1))
# iterates total sample size instead of sample size in smallest arm
# in this case no big difference
sampSize(models, doses, base = 0, maxEff = 0.4, sigma = 1,
         alpha = 0.05, upperN = 500, scal = 200, typeN = "total",
         alRatio=c(2,1,1,1,1,1))


# sample size calculation for general matrix of means
dvec <- c(0, 10, 50, 100)                             
mu1 <- c(1, 2, 2, 2)                                  
mu2 <- c(1, 1, 2, 2)                                  
mu3 <- c(1, 1, 1, 2)                                  
mMat <- cbind(mu1, mu2, mu3)                          
dimnames(mMat)[[1]] <- dvec                           
sampSize(muMat = mMat, doses = dvec, sigma = 1,       
       alpha = 0.05, upperN = 10, alRatio=c(2,2,1,1))

## End(Not run)

[Package MCPMod version 1.0-10.1 Index]