fixed @ R-forge. New version should appear on CRAN soon.
Thanks for the report!
Torsten
---------- Forwarded message ----------
Date: Sat, 3 Sep 2011 23:56:35 +0200
From: Ulrich Halekoh <ulrich.hale...@agrsci.dk>
To: "r-help@r-project.org" <r-help@r-project.org>
Subject: [R] glht (multcomp): NA's for confidence intervals using
univariate_calpha
Hej,
Calculation of confidence intervals for means
based on a model fitted with lmer
using the package multcomp
- yields results for calpha=adjusted_calpha
- NA's for calpha=univariate_calpha
Example:
library(lme4)
library(multcomp)
### Generate data
set.seed(8)
d<-expand.grid(treat=1:2,block=1:3)
e<-rnorm(3)
names(e)<-1:3
d$y<-rnorm(nrow(d)) + e[d$block]
d<-transform(d,treat=factor(treat),block=factor(block))
##### lmer fit
Mod<-lmer(y~treat+ (1|block), data=d)
### estimate treatment means
L<-cbind(c(1,0),c(0,1))
s<-glht(Mod,linfct=L)
## confidence intervals
confint(s,calpha=adjusted_calpha())
#produces NA's for the confidence limits
confint(s,calpha=univariate_calpha())
#for models fitted with lm the problem does not occur
G<-lm(y~treat+ block, data=d)
L<-matrix( c(1,0,1/3,1/3,1,1,1/3,1/3),2,4,byrow=TRUE)
s<-glht(G,linfct=L)
confint(s,calpha=adjusted_calpha())
confint(s,calpha=univariate_calpha())
multcomp version 1.2-7
R:platform i386-pc-mingw32
version.string R version 2.13.1 Patched (2011-08-19 r56767)
Regards
Ulrich Halekoh
Department of Molecular Biology and Genetics,
Aarhus University, Denmark
ulrich.hale...@agrsci.dk
______________________________________________
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.
______________________________________________
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.