Hello.

I'm replying because you haven't had a reply. You haven't said which
system you are running or which version of different packages you have
installed.

On my system (see below for the results from running sessionInfo())
that code runs fine with no errors at all.

library(multcomp)
#  Loading required package: mvtnorm
amod <- aov(minutes ~ blanket, data=recovery)
rht <- glht(amod, linfct = mcp(blanket = "Dunnett"),
              alternative = "less")
rht


produces:


General Linear Hypotheses

Multiple Comparisons of Means: Dunnett Contrasts


Linear Hypotheses:
             Estimate
b1 - b0 >= 0   -2.133
b2 - b0 >= 0   -7.467
b3 - b0 >= 0   -1.667



On 21/11/2007, Qiu Anqi <[EMAIL PROTECTED]> wrote:
> I am not sure whether there is a bug. When I tested the example given
> for "glht" in the help, I entered the following error:
>
>
>
> Running commands:
>
> amod <- aov(minutes ~ blanket, data = recovery)
> rht <- glht(amod, linfct = mcp(blanket = "Dunnett"),
>               alternative = "less")
>
>
> Errors are:
>
> Error in try(coef.(model)) : could not find function "coef."
>
> Error in modelparm.default(model, ...) : no 'coef' method for 'model'
> found!
>

This all sounds a bit odd, and (although I am not an R expert by any
means) therefore wonder whether you have an installation problem of
some form?

my sessionInfo():

R version 2.6.0 (2007-10-03)
i386-apple-darwin8.10.1

locale:
en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base

other attached packages:
[1] multcomp_0.992-6 mvtnorm_0.8-1    lattice_0.16-5   RODBC_1.2-2

loaded via a namespace (and not attached):
[1] grid_2.6.0


-- 
Dr. Mark Wardle
Specialist registrar, Neurology
Cardiff, UK

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to