LH2OM: Predict missing life-history parameters

Description Usage Arguments Details Value Functions Note Author(s) Source References Examples

View source: R/OM_functions.R

Description

Predict missing life-history based on taxonomic information and hierachical model fitted to FishBase life-history parameters

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
LH2OM(
  OM,
  dist = c("unif", "norm"),
  filterMK = FALSE,
  plot = TRUE,
  Class = "predictive",
  Order = "predictive",
  Family = "predictive",
  msg = TRUE,
  db = DLMtool::LHdatabase
)

predictLH(
  inpars = list(),
  Genus = "predictive",
  Species = "predictive",
  nsamp = 100,
  db = DLMtool::LHdatabase,
  dist = c("unif", "norm"),
  filterMK = TRUE,
  plot = TRUE,
  Class = "predictive",
  Order = "predictive",
  Family = "predictive",
  msg = TRUE
)

Arguments

OM

An object of class 'OM'

dist

Character. Should parameters be sampled from a uniform (unif) or normal (norm) distribution?

filterMK

Logical. Should the predicted M and K parameters be filtered within the range specied in inparsor OM? e.g. OM@M and OM@K. Empty slots or slots with all values of 0 are considered unknown.

plot

Logical. Should the plot be produced?

Class

Optional higher order taxonomic information

Order

Optional higher order taxonomic information

Family

Optional higher order taxonomic information

msg

Logical. Should messages be printed?

db

Database from FishLife model with fitted model results

inpars

A named list with lower and upper bounds of provided parameters: Linf, L50, K and M (must be length 2). Unknown or missing parameters should not be included. For example, an empty list assumes that all four life history parameters are unknown and need to be estimated. See Details below for more information.

Genus

Character string specifying the Genus name. Optional. Default is 'predictive'

Species

Character string specifying the Species name. Optional. Default is 'predictive'. If full species name (Genus + Species) is not found if FishLife database (based on FishBase) higher order taxonomony will be used (e.g., Family) for the predictions.

nsamp

The number of samples to return

Details

The model predicts missing life-history parameters based on provided parameters and taxonomic information. If both M and K are provided in inpars or OM, K values are predicted and predictions filtered so that resulting K values are within bounds specified in inpars$K or OM@K (see filterMK).

If both Linf and L50 are provided in inpars or OM, L50 values are predicted and values in inpars$L50 or OM@L50 are ignored.

Value

LH2OM: An OM with OM@cpars populated with OM@nsim samples of M, K, Linf and L50

predictLH: A data.frame with nsamp rows with Linf, L50, K, and M values.

Functions

Note

See relevant section of the DLMtool User Guide for more information.

Author(s)

A. Hordyk

Source

https://github.com/James-Thorson/FishLife/

References

Thorson, J. T., S. B. Munch, J. M. Cope, and J. Gao. 2017. Predicting life history parameters for all fishes worldwide. Ecological Applications. 27(8): 2262–2276

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
myOM<-LH2OM(DLMtool::testOM)

# drawing known parameters from normal distribution
myOM <- LH2OM(DLMtool::testOM, dist='norm')

# predict life-history parameters and return a data frame

# predict all life-history parameters 
Predicts <- predictLH(list(), "Katsuwonus", "pelamis")
head(Predicts)

# predict L50 from Linf, and M and K
Predicts <- predictLH(list(Linf=c(90, 95)), "Katsuwonus", "pelamis")

# predict L50 and K 
Predicts <- predictLH(list(Linf=c(90, 95), M=c(0.8, 0.9)), "Katsuwonus", "pelamis")

# predict L50 and K sampling Linf and M from normal distribution 
Predicts <- predictLH(list(Linf=c(90, 95), M=c(0.8, 0.9)), "Katsuwonus", "pelamis", dist='norm')

DLMtool/DLMtool documentation built on June 20, 2021, 5:20 p.m.