## example without covariates
data(biom)
modlist <- list(emax = 0.05, linear = NULL, logistic = c(0.5, 0.1))
fit1 <- MCPtest(resp ~ dose, biom, modlist)
## now calculate critical value (but not p-values)
fit2 <- MCPtest(resp ~ dose, biom, modlist, critV = TRUE, pVal = FALSE)
## now hand over critical value
fit3 <- MCPtest(resp ~ dose, biom, modlist, critV = 2.24)
## example with covariates
data(IBScovars)
modlist <- list(emax = 0.05, linear = NULL, logistic = c(0.5, 0.1))
MCPtest(resp ~ dose, IBScovars, modlist, addCovars = ~gender)
## example with contrast matrix handed over
data(biom)
## calculate a contrast matrix
mu1 <- c(1, 2, 2, 2, 2)
mu2 <- c(1, 1, 2, 2, 2)
mu3 <- c(1, 1, 1, 2, 2)
mMat <- cbind(mu1, mu2, mu3)
dimnames(mMat)[[1]] <- sort(unique(biom$dose))
pM <- planMM(muMat = mMat, doses = doses, n = 20, cV = FALSE)
## perform MCP analysis
MCPtest(resp~dose, data = biom, contMat = pM$contMat)
Run the code above in your browser using DataLab