<rbuxton <at> mun.ca> writes: > I have a post I would like to put on the "95% confidence intercal with glm" > thread. Thank-you so much!
Sending it where you did and titling it "Re: 95% confidence interval with glm" might add it to the same thread, but even if not it will be in roughly the right place. > I am wondering first of all if anyone knows how to calculate confidence > intervals for a GLMM? I use the lme4 library. This is a bit of a thorny problem, and you should probably (a) post the question to r-sig-mixed-mod...@r-project.org (again with an informative title) and (b) see <http://glmm.wikidot.com/faq> (search for "prediction"). > > Also, I am wondering how to predict a model mean and > confidence intervals for a > particular independent variable? > > For example in the following example: > >> counts <- c(18,17,15,20,10,20,25,13,12) > >> outcome <- gl(3,1,9) > >> treatment <- gl(3,3) > >> d.AD <- data.frame(treatment, outcome, counts) > >> glm.D93 <- glm(counts ~ outcome + treatment, family=poisson, > >> data=d.AD) > > How would one calculate the confidence intervals for the > "treatment" variable? > Is there something that can come after the 'se.fit=TRUE' command? confint(glm.D93) is as close as you can come. The treatment variable is actually represented by two different parameters (contrasts between levels 1 and 2 and between levels 1 and 3, by default, but you can change this: see ?contrasts ). Ben Bolker ______________________________________________ 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.