Skip to contents

Calculate_ratio projects the covariance among traits onto a single difference (interpreted as a ratio for log-scaled traits)

Usage

Calculate_ratio(
  params = c("K", "M"),
  Database = FishLife::FishBase_and_RAM,
  Cov_gjj = Database$Cov_gvv,
  Mean_gj = Database$beta_gv,
  ParentChild_gz = Database$ParentChild_gz
)

Arguments

params

Parameter names to use in calculation

Cov_gjj

Array of estimated covariance for each taxonomic group g and trait j

Mean_gj

Matrix of Empirical Bayes predictions of traits for each taxonomic group

ParentChild_gz

Matrix representing taxonomic tree for analyzed data

Value

Matrix of exponentiated-differences (ratios) and log-standard deviations for projection

median

median difference for taxonomic group

N_obsfactors

log-standard deviation of difference for taxonomic group