[R] glmmPQL question!

Spencer Graves spencer.graves at pdf.com
Thu Aug 17 01:57:01 CEST 2006

  I don't think there is an easy way to do that. If it were my problem, 
I think I'd start by trying to the model using 'lmer' associated with 
the 'lme4' package. I would then try to pass the fit to 'mcmcsamp' to 
get a random sample of parameter estimates following the posterior 
distribution. Then I'd convert the simulated parameters into a 
distribution of predictions for the conditions of interest. While doing 
this, I'd apply "quantile" of the distribution of predictions for each 
set of conditions to get the desired confidence limits.

Make sense?

If you'd like further help from this listserve, please submit another 
post. When you do that, however, I strongly urge you to include 
commented, minimal, self-contained, reproducible code illustrating 
something you tried that didn't quite work to help people understand 
what you want (as suggested in the posting guide 
"www.R-project.org/posting-guide.html"). Without such a minimal, self 
contained example, your problem is rarely as clear, and people's replies 
are less likely to be relevant. Since they know that, they are less 
likely to reply.

Hope this helps.
Spencer Graves

m-krutky at northwestern.edu wrote:
> Hello Folks- 
> Is there a way to create confidence bands with 'glmmPQL' ??? 
> I am performing a stroke study for Northwestern University in Chicago, Illinois.  I am trying to
> decide a way to best plot the model which we created with the glmmPQL function in R.   I would like 
> to plot my actual averaged data points within 95 % confidence intervals from the model. Plotting
> the model is easy, but determining confidence bands is not. 
> Here is my model:
> ratiomodel<-glmmPQL(ratio~as.factor(joint)*time, random = ~ 1 | subject, family = Gamma(link =
> "identity"),alldata3)
> I am used to seeing confidence intervals from models that increase, “flair out” in the y direction, 
> at the beginning and ending time points (x values) of the simulated data.  If I use 'lm' and pass
> the command 'int = "c" ' 'to create this model I can easily find and plot this type of confidence
> band for 'ratio~time'.  But I need to take into account 'as.factor(joint)', and in fact I can
> produce confidence bands with 'glm' by passing in 'se.fit = TRUE', but the problem is I need to
> make subject a random variable, and take into account my ratio with the Gamma distribution.  
> Is there a way to create confidence bands with 'glmmPQL' ??? ' as.factor(joint)' has 3 levels, so I 
> would like to produce this linear model with three levels and confidence bands for comparison of
> the levels of 'joint'.  
> Any Help at all with my problem would be greatly appreciated!!
> LJ
> ------------------------------------------------------------------------
> ______________________________________________
> R-help at stat.math.ethz.ch 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.

More information about the R-help mailing list