[R] lmer effects-type plot?

John Fox jfox at mcmaster.ca
Mon Apr 1 01:54:50 CEST 2013


Dear Nicole,

Thanks to Sandy Weisberg, who is a coauthor of the package, the effects
package has methods for objects produced by lme() in the nlme package and
lmer() and glmer() in the lme4 package, to plot the fixed effects. See
?effect.

I hope this helps,
 John

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of Nicole Ford
> Sent: Sunday, March 31, 2013 7:27 PM
> To: r-help-r-project.org help
> Subject: [R] lmer effects-type plot?
> 
> hello, all.
> 
> while i have a mcmc running, i am looking at the frequestist method of
> my model.  i have never done HLM so i am looking for ways to plot them
> that might yeild something useful like dr. fox's effects plot package.
> this is my model, where dem is democracy ranked continuous 1:10, trsut
> is a 3 level categorical variable, cpi is 1:10, etc...
> 
> > hier.jags2.mod <- lmer(dem ~ trust*cpi + age + gender + educ + income
> + (1 + trust | country), data=wvsAB)
> 
> i have tried the following:
> 
> > tmp <- as.data.frame(confint(glht(.hier.jags2.mod))$confint)
> > tmp$Comparison <- rownames(tmp)
> > q<-(ggplot(tmp, aes(x = Comparison, y = Estimate, ymin = lwr, ymax =
> upr,  srt = 45)) + geom_errorbar() + geom_point())
> > q + theme(axis.text.x=theme_text(angle=-45))
> 
> as well as some function using xyplot to little avail, as well as a few
> others i happened upon online...
> 
> any suggestions of packages/ sample code would be helpful.
> ______________________________________________
> 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.



More information about the R-help mailing list