Skip to contents

Plots bivariate predictive intervals for specified parameters and taxa

Usage

Plot_taxa(
  Taxa,
  prob = 0.95,
  params = matrix(c("K", "M", "Winfinity", "Loo", "tmax", "tm", "Lm", "Temperature",
    "ln_margsd", "rho", "logitbound_h", "ln_r"), ncol = 2, byrow = TRUE),
  Database = FishLife::FishBase_and_RAM,
  Cov_gjj = Database$Cov_gvv,
  Mean_gj = Database$beta_gv,
  ParentChild_gz = Database$ParentChild_gz,
  Y_ij = Database$Y_ij,
  g_i = Database$g_i,
  xlim = log(c(0.01, 2)),
  ylim = xlim,
  ticks = c(0, 5),
  logticks = c(1, 2, 5),
  partial_match = FALSE,
  drop_pred = TRUE,
  mfrow = c(nrow(params), 1),
  legendnum = 2,
  verbose = FALSE,
  plot_lines = FALSE,
  lcol = rainbow(length(Taxa)),
  lty = rep("solid", length(Taxa)),
  xaxt = "s",
  yaxt = "s",
  ...
)

Arguments

Taxa

One or more taxonomic names (matching rows from ParentChild_gz[,'ChildName'])

prob

for defining predictive interval

params

matrix (2 columns) of parameters to plot, where each row gives parameter names for a given plot

Database

Whether to use results for both adult and stock-recruit parameters, Database="FishBase_and_RAM", or just adult parameters, Database="FishBase"

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

Y_ij

a data frame of trait values (perhaps log-scaled) with rows for records, and tagged-columns for traits

g_i

Vector that associates every observation with a level of the taxonomic tree

xlim

x-limits if add=FALSE

ylim

y-limits if add=FALSE

ticks

ticks to use if plotting on a natural-scale

logticks

ticks to use if plotting on a log-scale

partial_match

Should Taxon be an partial match or not (exact match)

drop_pred

Boolean whether to drop "_predictive" from legend

mfrow

numeric vector giving number of rows and columns for panel figure

legendnum

which panel to use for legend

verbose

Boolean whether to print diagnostics to terminal

plot_lines

whether to plot lines representing "major axis" and "OLS" regression parameters

lcol

line color for ellipse

...

additional arguments passed to shape::plotellipse