knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "fig/README-" )
R package to plot the complete pooling, no pooling, and partially pooled estimates for a mixed effects model based on code from TJ Mahr.
You can install lme4plotpartial from github with:
# install.packages("devtools") devtools::install_github("jrosen48/lme4plotpartial")
Has one function, plot_partial_pooling()
, used as follows:
library(lme4plotpartial) library(dplyr, warn.conflicts = FALSE) library(ggforce) p <- plot_partial_pooling(storms, y_var = wind, x_var = pressure, group = year) # Split the facets over several pages p + facet_wrap_paginate("year", ncol = 3, nrow = 4, page = 1) p + facet_wrap_paginate("year", ncol = 3, nrow = 4, page = 2) p + facet_wrap_paginate("year", ncol = 3, nrow = 4, page = 3) p + facet_wrap_paginate("year", ncol = 3, nrow = 4, page = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.