parameters_definition: Define parameters for all functions

Description Usage Arguments

Description

Define parameters for all functions

Usage

1
2
3
4
5
6
7
parameters_definition(condition, dat_nos, dat_prcs, data, digit,
  first_column_name, fixed, formula_full, formula_null, id, id_to_do,
  increasing, labels, labels_obj1, labels_obj2, list, list_extra_meta_obj,
  list_fit, mar, meta_data, meta_obj, meta_obj1, meta_obj2, model,
  model_list, mod_sel, morphology, nb_cores, phenological, phenology,
  precipitation, prior_weights, rand_trait, resid_formula, slopes_obj,
  sort, stat, table, temperature, traits, typeTab, xlim, ylim, ...)

Arguments

condition

A character specifying which condition is to be tested (for more details see Radchuk et al. (in review)):

  • '1' - Condition 1 (effect of year on climate);

  • '2' - Condition 2 (effect of climate on traits);

  • '3' - Condition 3 (testing whether weighted mean selection over years differs from 0);

  • '2b' - Condition 2, but also with abundance included as a predictor;

  • '3b' - testing whether selection changes over years.

dat_nos

Dataset without selection.

dat_prcs

Dataset with selection - PRCS (Phenotypic Responses to Climate with Selection data).

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.

digit

An integer indicating how many digits to display on the screen.

first_column_name

A string indicating the name of the first column which is taken from the row names of the table

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.

formula_full

A character string indicating the formula for the full model to be fitted.

formula_null

A character string indicating the formula for the null model to be fitted.

id

A character specifying the unique study id.

id_to_do

A list of study ids for which to plot the raw data and fitted models.

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.

labels_obj1

A list of labels to be used for slopes extracted from meta_obj1 object. This list is returned by the function prepare_labels.

labels_obj2

A list of labels to be used for slopes extracted from meta_obj2 object. This list is returned by the function prepare_labels

list

A list of meta-analytical models from which statistics is to be extracted.

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).

list_fit

A fitted object returned by the function fit_cond_id.

mar

A vector specifying the plot margins, analogously to par.

meta_data

A dataframe with rows representing records per studies, including the effect sizes and required fixed and random effects.

meta_obj

A fitted meta-analytical model object.

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.

model

A meta-analytical model including studies as random effects. Heterogeneity metrics are to be computed for this model.

model_list

A list of the models from which to extract the summary statistics for the table.

mod_sel

An object produced by the function fit_cond_id with the settings 'condition = 3'.

morphology

A boolean indicating if the morphological data should be extracted (default is FALSE).

nb_cores

An integer indicating how many cores should be used for assessing the LRT by bootstrap (see spaMM documentation for more details).

phenological

A boolean indicating whether the plot for phenological traits should be produced (default is TRUE).

phenology

A boolean indicating if the phenological data should be extracted (default is FALSE).

precipitation

A boolean indicating if the precipitation data should be extracted (default is FALSE).

prior_weights

A numeric vector of prior weights.

rand_trait

A boolean indicating whether to include a trait type as a random effect in the model.

resid_formula

A character string indicating the formula for the residual model to be fitted.

slopes_obj

A list returned by prepare_slopes that contains the lists with values for the slopes, their confidence intervals and labels.

sort

A vector specifying the variables to use for sorting the labels.

stat

A character specifying what should be extracted from the fitted models. Possible are: LRT' for likelihood-ratio test statistics, 'RandStudy' for the random variance due to the study ID, 'RandPub' for the random variance due to the publication ID, 'globslope' for global effect sizes, 'globse' for the standard errors of global effect sizes.

table

The dataframe to be exported as *.xlsx

temperature

A boolean indicating if the temperature data should be extracted (default is FALSE).

traits

A boolean indicating whether the phenotypic traits are used as response.

typeTab

A character specifying what type of table to output: 'LRT' for a table with likelihood-ratio statistics and random variances, 'efSizes' for a table with estimated effect sizes and their standard errors, and 'heterog' for a table of heterogeneity metrics.

xlim

A vector specifying limits of x axis.

ylim

A vector specifying limits of y axis.

...

Additional parameters for the function fitme.


radchukv/adRes documentation built on June 1, 2019, 7:05 p.m.