Description Usage Arguments Details Value References See Also Examples
Calculates the power under the assumed candidate set for different sample sizes.
1 2 3 4 5 |
models |
A list specifying the candidate models. This
can also be a fullMod object, then the arguments |
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 |
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 |
muMat |
An optional matrix with means in the columns, dimnames should
be given (dose levels and names of contrasts), if specified the
the |
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. |
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.
A powerMM
object, i.e. a matrix containing the power values for different sample sizes and models
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | ## 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
## End(Not run)
|
Loading required package: mvtnorm
Loading required package: lattice
linear emax logistic exponential betaMod1 betaMod2 min
10 0.2164735 0.2178171 0.2874361 0.1995559 0.1969237 0.2096792 0.1969237
30 0.4969080 0.4858853 0.6509473 0.4657323 0.5052014 0.4755112 0.4657323
50 0.7019457 0.6843789 0.8517957 0.6708289 0.7335669 0.6776581 0.6708289
70 0.8333637 0.8176918 0.9425685 0.8099913 0.8695279 0.8131070 0.8099913
90 0.9119092 0.8999899 0.9796180 0.8961539 0.9408605 0.8978555 0.8961539
mean max
10 0.2213143 0.2874361
30 0.5133643 0.6509473
50 0.7200290 0.8517957
70 0.8477084 0.9425685
90 0.9210645 0.9796180
attr(,"alRatio")
[1] 1
attr(,"sumFct")
[1] "min" "mean" "max"
attr(,"class")
[1] "powerMM"
linear emax logistic exponential betaMod1 betaMod2 min
10 0.1396930 0.1392149 0.1950013 0.1264927 0.1239161 0.1333446 0.1239161
30 0.3787782 0.3645262 0.5344456 0.3490849 0.3864658 0.3572209 0.3490849
50 0.5917686 0.5693977 0.7720868 0.5591998 0.6292449 0.5646946 0.5591998
70 0.7507108 0.7287865 0.9006623 0.7218047 0.7983974 0.7252889 0.7218047
90 0.8554441 0.8366637 0.9599484 0.8337316 0.8982772 0.8351056 0.8337316
mean max
10 0.1429438 0.1950013
30 0.3950869 0.5344456
50 0.6143987 0.7720868
70 0.7709418 0.9006623
90 0.8698618 0.9599484
attr(,"alRatio")
[1] 1
attr(,"sumFct")
[1] "min" "mean" "max"
attr(,"class")
[1] "powerMM"
mu1 mu2 mu3 min mean max
10 0.1900207 0.2558825 0.1898123 0.1898123 0.2119052 0.2558825
30 0.5348320 0.6795100 0.5348305 0.5348305 0.5830575 0.6795100
50 0.7750864 0.8925756 0.7750706 0.7750706 0.8142442 0.8925756
70 0.9052432 0.9701097 0.9052237 0.9052237 0.9268589 0.9701097
90 0.9634187 0.9925838 0.9634074 0.9634074 0.9731366 0.9925838
attr(,"alRatio")
[1] 1
attr(,"sumFct")
[1] "min" "mean" "max"
attr(,"class")
[1] "powerMM"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.