data(IBScovars)
# perform (model based) multiple contrast test
modlist <- list(linear = NULL, emax = 0.2, quadratic = -0.17)
# plot model shapes (need to specify base and maxEff additionally)
plotModels(modlist, c(0,4), base = 0, maxEff = 1)
fittest <- MCPtest(resp ~ dose, IBScovars, modlist, addCovars = ~ gender)
# fit non-linear dose-response model
fitemax <- fitDRModel(resp ~ dose, IBScovars, "emax")
# display fitted dose-effect curve
plot(fitemax)
# estimate minimum effective dose
MED(fitemax, clinRel = 0.25)
# MCP-Mod is a combination of (model based) multiple contrast tests
# and nonlinear regression
models <- list(linear = NULL, emax = 0.2, quadratic = -0.17)
dfe <- MCPMod(resp ~ dose, IBScovars, models, addCovars = ~gender,
pVal = TRUE, selModel = "maxT",
doseEst = "MED2", clinRel = 0.25)
# detailed information is available via summary
summary(dfe)
# plots data with selected model function
plot(dfe)
# Calculate optimal designs for MED estimation
doses <- c(0, 10, 25, 50, 100, 150)
mods <- list(linear = NULL, emax = 25, exponential = 85,
linlog = NULL, logistic = c(50, 10.8811))
fMod <- fullMod(mods, doses, base=0, maxEff=0.4, off=1)
weights <- rep(1/5, 5)
desMED <- calcOptDesign(fMod, weights, doses, clinRel=0.2, scal=200,
off=1, method = "nlminb")
Run the code above in your browser using DataLab