# 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