View source: R/EffectsPlotter.R
EffectsPlotter | R Documentation |
This function produces effects plots for the conditional model of model objects produced by
glmmTMB
. Effects can be plotted for multiple models in a single function call.
These effects plots are based on those found in
this document.
EffectsPlotter( TopMods, ParamLabs = NULL, ConfInts = c(90, 80), Scaled = T, ThemeBlack = T )
TopMods |
This argument can accept multiple input types, and is used to specify which models effects plots should be generated for. If an effects plot is desired for a single model, users can supply the unquoted model object name. If effects plots for multiple models are desired, users can specify a chahracter vector of model names. |
ParamLabs |
A character vector of labels for each model estimate. Labels must be supplied for estimates in the
same order as the vector returned by |
ConfInts |
A numeric vector specifying up to three condifence intervals as percent values from largest
to smallest (e.g., for 80%, 90%, and 95% confidence intervals, supply |
Scaled |
A logical value indicating whether model estimates are scaled (T) or not (F). When |
ThemeBlack |
A logical value indicating whether |
This function generates effects plots using geom_point
for point estimates and
geom_crossbar
for confidence intervals. Resultant plots are named with the model name
followed by "EffectsPlot" (e.g., for a model named "EpfuNb2", the effects plot would be named "EpfuNb2EffectsPlot").
Because all models specified in a call to this function share estimate labels, all models in a a given call to this function must have the same model formula.
data("Epfu_Nb2_Long", "Myev_Nb2_Long", package = "EcoCountHelper") Labels <- letters[1:12] #Effects plot for a single model EffectsPlotter(Epfu_Nb2_Long, Labels) Epfu_Nb2_LongEffectsPlot #Effects plot for multiple models specified #in a character vector. Mods <- c("Epfu_Nb2_Long", "Myev_Nb2_Long") EffectsPlotter(Mods, Labels) Epfu_Nb2_LongEffectsPlot Myev_Nb2_LongEffectsPlot #Effects plot for multiple models specified #in a data frame ModTable <- data.frame(Species = c("Epfu", "Myev"), Mods = c("Epfu_Nb2_Long", "Myev_Nb2_Long")) EffectsPlotter(ModTable$Mods, Labels) Epfu_Nb2_LongEffectsPlot Myev_Nb2_LongEffectsPlot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.