Description Usage Arguments Details Value Examples
fit_all
Subselects the data according to the specified requirements,
extracts the effect sizes per each study for a specied condition and fits a
meta-analytical model to calculate the global effect size and its standard error
1 2 3 |
data |
A dataframe containing per each study the time series of relevant variables (i.e. yearly climate values, yearly trait values or yearly selection differentials) to be analyzed. |
temperature |
A boolean indicating if the temperature data should be extracted (default is FALSE). |
precipitation |
A boolean indicating if the precipitation data should be extracted (default is FALSE). |
phenology |
A boolean indicating if the phenological data should be extracted (default is FALSE). |
morphology |
A boolean indicating if the morphological data should be extracted (default is FALSE). |
condition |
A character specifying which condition is to be tested (for more details see Radchuk et al. (in review)):
|
nb_cores |
An integer indicating how many cores should be used for assessing the LRT by bootstrap (see spaMM documentation for more details). |
rand_trait |
A boolean indicating whether to include a trait type as a random effect in the model. |
fixed |
A string indicating the name of the fixed effect (called exactly as it is called in the dataframe meta_data) if a meta-analytic model includes a fixed predictor, and NULL (default) otherwise. |
digit |
An integer indicating how many digits to display on the screen. |
The data can be subselected per climatic variable and per trait category, as detailed in
prepare_data
. Next, a condition tested should be specified as described in
extract_effects_all_ids
. And finally, a meta-analytical model may
be fitted with an intercept only to assess the global effect size across the studies
or with a specified fixed effect.
A list with three elements. The first element is the data that was subset according to the specified requirements. The second element is a dataset of extracted effects sizes per study and their standard errors, together with relevant meta-data per study. The third element is the list of length eight, containing the results of the meta-analysis: a global slope, its SE, a full model fitted with REML, a null model fitted with ML, a global model fitted with ML, results of LRT comparing the model with the effect vs. the reduced one, the data used for the meta-analysis, and heterogeneity metrics.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | nb_cores <- 2L ## increase the number for using more cores
meta_Sel_phen <- fit_all(data = dat_Sel, temperature = TRUE,
precipitation = FALSE,
phenology = TRUE, morphology = FALSE,
condition = '3', nb_cores = nb_cores,
rand_trait = FALSE, fixed = NULL, digit = 3)
meta_Sel_morph <- fit_all(data = dat_Sel,
temperature = TRUE, precipitation = FALSE,
phenology = FALSE, morphology = TRUE,
condition = '3', nb_cores = nb_cores,
rand_trait = FALSE, fixed = NULL, digit = 3)
meta_Sel_phen_Fitn <- fit_all(data = dat_Sel,
temperature = TRUE, precipitation = FALSE,
phenology = TRUE, morphology = FALSE,
condition = '3', nb_cores = nb_cores,
rand_trait = FALSE,
fixed = 'Fitness_Categ', digit = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.