#######################################
## cell transformation assay example ##
#######################################
str(cta)
boxplot(foci ~ conc, cta, xlab="concentration", col="lightgreen")
## change class of cta$concentration into factor
cta$concf <- factor(cta$conc, levels=unique(cta$conc))
# glm fit assuming a Poisson distribution for foci counts
# parameter estimation on the log link
# estimating marginal means by removing the intercept
fm <- glm(foci ~ concf-1, data=cta, poisson(link="log"))
### Comparing each dose to the control by Dunnett-type comparisons
# Constructing contrast matrix
CM <- contrMat(table(cta$concf), type="Dunnett")
# calculating signed root deviance profiles
(dmcp <- mcpcalc(fm, CM, method="IRWLS"))
# plot profiles
plot(dmcp)
# multiplicity adjusted p-values
(adjpv <- test(dmcp,adjust="single-step",alternative="two.sided",margin=0))
plot(adjpv, alpha=0.05, order=FALSE)
plot(dmcp, adjpv)
# simultaneous confidence intervals
(ci <- confint(dmcp, adjust="single-step"))
# exponent of confidence limits --> ratio of group means
exp(ci)
plot(exp(ci))
abline(v=1, lty=2)
plot(dmcp, ci)
Run the code above in your browser using DataLab