# Plotting mixed-effects model results with effects package

**Minding the Brain**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

**effects**package.

To show how this would work, I pillaged some data from a word-to-picture matching pilot study. Younger adults (college students) and older adults (mostly 50s and 60s) did a word-to-picture matching task in the presence of either cohort competitors (camera – camel) or semantic competitors (lion – tiger).

> summary(RT.demo)

Subject Target Condition ACC RT Group

2102 : 40 chicken: 36 Cohort :690 Min. :1 Min. :1503 YC:701

2103 : 40 hat : 36 Semantic:675 1st Qu.:1 1st Qu.:2131 OC:664

2104 : 40 penny : 36 Median :1 Median :2362

2106 : 40 potato : 36 Mean :1 Mean :2442

2109 : 40 radio : 36 3rd Qu.:1 3rd Qu.:2684

2116 : 40 stool : 36 Max. :1 Max. :4847

(Other):1125 (Other):1149

**effects**package to convert these parameter estimates into condition mean and SE estimates. The key function is effect(), which takes a term from the model and the model object. We can use summary() on the effect list object to get the information we need.

Or for people who like dynamite plots:

> ggplot(x, aes(Group, fit, color=Condition, fill=Condition)) + geom_bar(stat=”identity”, position=”dodge”) + geom_errorbar(aes(ymin=fit-se, ymax=fit+se), width=0.4, position=position_dodge(width=0.9)) + theme_bw(base_size=12)

**leave a comment**for the author, please follow the link and comment on their blog:

**Minding the Brain**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.