Skip to contents

Iterates over a list of PFTs and runs run.meta.analysis.pft for each one. This is the main entry point called by runModule.run.meta.analysis.

Usage

run.meta.analysis(
  pfts,
  iterations,
  random = TRUE,
  threshold = 1.2,
  dbfiles,
  database,
  use_ghs = TRUE,
  update = FALSE,
  return_data = FALSE
)

Arguments

pfts

the list of pfts to get traits for

iterations

(integer) Number of sampler iterations for MCMC analysis

random

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

threshold

Gelman-Rubin convergence diagnostic, passed on to pecan.ma.summary

dbfiles

(character) directory where previous results are found

database

database connection parameters

use_ghs

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

update

logical: Rerun the meta-analysis if result files already exist?

return_data

(boolean; default = FALSE) If TRUE, attach trait.mcmc, post.distns, and jagged.data to the returned pft for in-memory chaining. Defaults to FALSE to preserve legacy behavior — attaching these objects to a pft that is embedded in a settings object would inflate the settings and can break serialization.

Value

Invisibly, a list (one element per input PFT) of the values returned by run.meta.analysis.pft. Each element is either the input pft list with trait.mcmc, post.distns, and jagged.data attached, or NA when no meta-analysis was performed for that PFT. Provenance files (trait.mcmc.Rdata, post.distns.Rdata, etc.) are also written to each pft$outdir as a side effect.

Details

This will use the following items from settings:

  • settings$pfts

  • settings$database$bety

  • settings$database$dbfiles

  • settings$meta.analysis$update

Author

Shawn Serbin, David LeBauer