Description Usage Arguments Details Value Examples
plot_forest
Plots a forest plot displaying the effect sizes
for each study and global effects across the studies
1 2 3 4 |
meta_obj1 |
A fitted meta-analytical model object whose global slopes and per-study effect sizes will be displayed on the plot. |
meta_obj2 |
An (optional) second fitted meta-analytical model object whose global slopes and per-study effect sizes will be displayed on the plot. |
list_extra_meta_obj |
A list of meta-analytical model objects to be used for displaying the global effects (either across all studies or in response to a fixed predictor). |
sort |
A vector specifying the variables to use for sorting the labels. |
increasing |
A Boolean specifying whether the slopes should be sorted in increasing (TRUE) or decreasing (FALSE) order. |
labels |
A vector specifying what should be used as labels for each study. See Details for kinds of labels available. |
mar |
A vector specifying the plot margins, analogously to |
This function first fits separate mixed-effects models per study id. All the models include predictors of interest. The possible types of labels are:
traits - the specific trait reported for each study;
fitness - the fitness measure used in each study;
country - a 2-letter country code;
authors - if there are more than two authors, the name of the first one, otherwise the name of the first two.
If the label is set to TRUE (default), it will be displayed on the plot.
Plots a forest plot with effect sizes (and SEs) for each study, and global effect size(s) on the bottom. The data used for the plot are returned (invisibly).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | nb_cores <- 2L
meta_Trait_phen <- fit_all(data = dat_Trait, temperature = TRUE,
precipitation = FALSE, phenology = TRUE,
morphology = FALSE, condition = '2',
nb_cores = nb_cores, rand_trait = FALSE,
fixed = NULL, digit = 3)
meta_Trait_morph <- fit_all(data = dat_Trait, temperature = TRUE,
precipitation = FALSE, phenology = FALSE,
morphology = TRUE, condition = '2',
nb_cores = nb_cores, rand_trait = FALSE,
fixed = NULL, digit = 3)
meta_Trait_phen_Tax <- fit_all(data = dat_Trait, temperature = TRUE,
precipitation = FALSE, phenology = TRUE,
morphology = FALSE, condition = '2',
nb_cores = nb_cores, rand_trait = FALSE,
fixed = 'Taxon', digit = 3)
test <- plot_forest(meta_obj1 = meta_Trait_phen$meta_res,
meta_obj2 = meta_Trait_morph$meta_res,
list_extra_meta_obj = list(meta_Trait_phen_Tax$meta_res),
sort = c("Species", "Study_Authors", "Fitness_Categ"),
increasing = TRUE,
labels = c(traits = TRUE,
fitness = TRUE,
country = TRUE,
authors = TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.