简体   繁体   中英

Sequential use of the Williams test to determine the minimum effective dose after finding a significant trend (using the multcomp package in R)

Suppose I am conducting a dose-response analysis using the multcomp package for R ( Bretz et al. (2011) Multiple Comparisons with R. Chapman & Hall/CRC ). The (simulated) data are as follows:

dat <- data.frame(Group = rep(c(0, 0.3, 0.7, 1.2, 1.8, 2.5), each = 5), 
                Response = c(rnorm(5, 20, 1.2),
                             rnorm(5, 19.5, 1.2),
                             rnorm(5, 19, 1.2),
                             rnorm(5, 15, 1.2),
                             rnorm(5, 12, 1.2),
                             rnorm(5, 11, 1.2) 
                             )
              )

As a first step, I would like to determine if there is a decreasing trend in the response (ie whether the mean response level declines with increasing dose). This can be done with one particularly powerful test - the Williams test ( Williams (1971) A Test for Differences between Treatment Means When Several Dose Levels are Compared with a Zero Dose Control. Biometric 27:103-117 ). Here is the R code:

dat$Group = factor(dat$Group)

M <- lm(Response ~ Group, data = dat)
trend = glht(M, linfct = mcp(Group = "Williams"), alternative = "less")

summary(trend)
     Simultaneous Tests for General Linear Hypotheses

Multiple Comparisons of Means: Williams Contrasts

Fit: lm(formula = Response ~ Group, data = dat)

Linear Hypotheses:
         Estimate Std. Error t value   Pr(<t)
C 1 >= 0  -7.8117     0.7587 -10.296  < 1e-08
C 2 >= 0  -7.3490     0.6571 -11.184  < 1e-08
C 3 >= 0  -6.5282     0.6195 -10.538  < 1e-08
C 4 >= 0  -5.1096     0.5998  -8.519  < 1e-08
C 5 >= 0  -4.3293     0.5877  -7.366 3.01e-08
(Adjusted p values reported -- single-step method)

The lowest p-value among the tested contrasts is <0.001, suggesting that there is a strong evidence for a monotonic decreasing trend in the response. Great, this is one important piece of information.

However, as the next step I would like to determine the so called "minimum effective dose (MED)", ie the lowest dose level that has a significant effect on the my response variable. In his original publication, Williams suggests to apply sequentially a number of t-like tests (ie compare the 2nd highest dose to control, then the third highest dose to control, and so on) and stop the procedure at the first insignificant result. The preceding significant result would correspond to the MED. Unfortunately, although similar to the t statistic, the test statistic proposed by Williams does not follow a standard t-distribution under the null hypothesis of no dose response. In his original paper, the author does tabulate some critical values for his test statistic.

I wonder, however, whether there is an R implementation available for such a sequential Williams test. Can it be done somehow using the multcomp package (say, by specifying contrasts in a certain way)? I've spent quite some time online trying to find an answer, but had to give up. Any help would be greatly appreciated.

You could use Dunnett contrasts to find the MED.

Or maybe a "step-up Williams" contrast:

# step-up Williams contrast matrix
n <- tapply(dat$Group, dat$Group, length)
k <- length(n)
CM <- c()
for (i in 1:(k - 1)) {
  help <- c(-1, n[2:(i + 1)] / sum(n[2:(i + 1)]), rep(0 , k - i - 1))
  CM <- rbind(CM, help)
}
rownames(CM) <- paste("C", 1:nrow(CM))
CM

# supply to glht()
summary(glht(M, linfct = mcp(Group = CM), alternative = "less"))
     Simultaneous Tests for General Linear Hypotheses

Multiple Comparisons of Means: User-defined Contrasts


Fit: lm(formula = Response ~ Group, data = dat)

Linear Hypotheses:
         Estimate Std. Error t value Pr(<t)    
C 1 >= 0   0.1535     0.7630   0.201 0.7214    
C 2 >= 0  -0.2032     0.6608  -0.308 0.5259    
C 3 >= 0  -1.5409     0.6230  -2.473 0.0219 *  
C 4 >= 0  -3.2164     0.6032  -5.332 <0.001 ***
C 5 >= 0  -4.2203     0.5910  -7.141 <0.001 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Adjusted p values reported -- single-step method)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM