Skip to contents

Complete meta-analysis workflow for a single plant functional type (PFT)

Usage

meta_analysis_standalone(
  trait_data,
  priors,
  iterations,
  outdir = file.path(tempdir(), "pecan-meta-analysis"),
  pft_name = NA_character_,
  random = TRUE,
  threshold = 1.2,
  use_ghs = TRUE,
  gamma_tau = 0.01
)

Arguments

trait_data

(list) Named list of trait data. List item names must be trait names (consistent with priors argument). List values are data.frames with the following required columns: name, mean statname, stat, greenhouse, n, site_id, specie_id, citation_id, cultivar_id, date, time, control

priors

(list) Named list of priors

iterations

(integer) Number of sampler iterations for MCMC analysis

outdir

(character; default = tempdir() / "pecan-meta-analysis") Path to directory where outputs will be stored.

pft_name

(character; default = NA) Name of PFT (for logging purposes).

random

(boolean; default = TRUE) Should random effects be used?

threshold

Gelman-Rubin convergence diagnostic (MGPRF) default = 1.2 following Bolker 2008 Ecological Models and Data in R

use_ghs

(boolean; default = TRUE) If TRUE, do not exclude greenhouse data

gamma_tau

(numeric; default = 0.01) Prior on gamma tau parameter

Value

(list) List of trait meta-analysis results, including:

  • trait.mcmc: MCMC samples

  • post.distns: Posterior distributions

  • jagged.data: "JAGS-ified" input data (after GHG screen, if applied)