Learn R Programming

MCPMod (version 1.0-10.1)

powerMM: Calculate power for different sample sizes

Description

Calculates the power under the assumed candidate set for different sample sizes.

Usage

powerMM(models, doses, base, maxEff, sigma, lower, upper, step,
        sumFct = c("min", "mean", "max"), off = 0.1 * max(doses),
        scal = 1.2 * max(doses), alpha = 0.025, twoSide = FALSE,
        control = mvtnorm.control(), muMat = NULL, alRatio = 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

lower, upper

Maximum and minimum group sample size for which the power is calculated.

step

Stepsize for the sample size at which the power is calculated. It is calculated at seq(lower,upper,by=step).

sumFct

A character vector giving the names of the summary functions used to combine the power values into one value. By default the minimum, the mean and the maximum are 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 should be performed. By default FALSE, so one-sided testing.

control

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

muMat

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

alRatio

Vector describing the relative patient allocations to the dose groups. See examples below, e.g. c(1,2,2) corresponds to allocating twice as many patients in dose groups two and three. Per default balanced allocations are assumed.

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.

Value

A powerMM object, i.e. a matrix containing the power values for different sample sizes and models

Details

Given the candidate set of models and associated guesstimates the function calculates the power to detect every model in the candidate set for different group sample sizes. Additionally summary functions can be specified to calculate the combined power (by default the minimum, mean and maximum). The location and scale parameters are determined by forcing the model function to go through (0,base) and (dmax,maxEff), see Pinheiro et al. (2006) for details. There exists a plot method for the output of the powerMM function. See the examples below.

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

plot.powerMM, powCalc

Examples

Run this code
# NOT RUN {
doses <- c(0,10,25,50,100,150)                                         
models <- list(linear = NULL, emax = 25,                               
               logistic = c(50, 10.88111), exponential= 85,            
               betaMod=matrix(c(0.33,2.31,1.39,1.39), byrow=TRUE, nrow=2))
pM <- powerMM(models, doses, base = 0, maxEff = 0.4, sigma = 1,
            alpha = 0.05, lower = 10, upper = 100, step = 20, scal = 200)         
pM
# a graphical display provides plot method
plot(pM)                                
# reproduces plot in JBS 16, p.651      
plot(pM, line.at = 0.8, models = "none")


# the same with fullMod object and default alpha
fMod <- fullMod(models, doses, base = 0, maxEff = 0.4, scal=200) 
pM <- powerMM(fMod, sigma = 1, lower = 10, upper = 100, 
              step = 20, scal = 200)         
pM

# using unbalanced (but fixed) allocations
pM <- powerMM(models, doses, base = 0, maxEff = 0.4, sigma = 1,       
               lower = 10, upper = 100, step = 20, scal = 200,
               alRatio = c(3, 2, 2, 1, 1, 1), typeN = "arm") 
plot(pM, summ = "mean")

# example, where means are directly specified
# doses   
dvec <- c(0, 10, 50, 100)
# mean vectors
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
pM <- powerMM(muMat = mMat, doses = dvec, sigma = 2, lower = 10,
              upper = 100, step = 20)         
pM
# }

Run the code above in your browser using DataLab