Torsten Hothorn
2011-Sep-05 13:02 UTC
[R] glht (multcomp): NA's for confidence intervals using univariate_calpha (fwd)
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.Halekoh at agrsci.dk> > To: "r-help at r-project.org" <r-help at 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.Halekoh at agrsci.dk > > ______________________________________________ > R-help at 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. >
Seemingly Similar Threads
- glht (multcomp): NA's for confidence intervals using univariate_calpha
- glht: Problem with symbolic contrast for factors with number-levels
- How to display y-axis labels in Multcomp plot
- glht function in multcomp gives unexpected p=1 for all comparisons
- GLHT in multcomp: Two similar models, one doesn't work