[R] using glht to replace simint in the multcomp package

Anthony Darrouzet-Nardi anthony at darrouzet-nardi.net
Thu Nov 16 20:21:52 CET 2006


Reposting this because I had the wrong subject on the the last message...

I had some code that used to work in an old version of multcomp:

herbcover <- 
read.delim("http://anthony.darrouzet-nardi.net/downloads/herbcover.txt")
herbcover$date <- as.POSIXct(strptime(herbcover$date, "%Y-%m-%d"))
herbcover$block <- factor(herbcover$block)
herbcover$treatment <- ordered(herbcover$treatment, levels = c("s+", "s-"))
int <- interaction(herbcover$treatment, herbcover$date)

require(multcomp)
contrast <- contrMat(table(interaction(herbcover$treatment, 
herbcover$date)), type = "Tukey")
csubset = contrast[c(1,14,23,28),]
herbstats <- simint(herbcover ~ int + block:factor(date), data = 
herbcover, cmatrix = csubset, whichf = "int", asympt = T)
summary(herbstats)
plot(herbstats)

I'm having trouble figuring out how to implement this same procedure 
with the new function glht.

Please let me know if you have suggestions on how I can get this to work,

Anthony



More information about the R-help mailing list