censored_index_fun_sdmTMB: Compute Poisson-lognormal model-based indices of relative...

View source: R/censored_index_fun_sdmTMB.R

censored_index_fun_sdmTMBR Documentation

Compute Poisson-lognormal model-based indices of relative abundance using sdmTMB See the vignette for details

Description

Compute Poisson-lognormal model-based indices of relative abundance using sdmTMB See the vignette for details

Usage

censored_index_fun_sdmTMB(
  data,
  survey_boundaries,
  species,
  M = 1000,
  return = T,
  ICR_adjust = F,
  cprop = 1.1,
  keep = F,
  use_upper_bound = FALSE,
  upper_bound_quantile = 1,
  plot = T,
  allyears = F,
  station_effects = T,
  seed = 0,
  verbose = F,
  n_trajectories = 10,
  preserve_inter_regional_differences = F,
  mesh
)

Arguments

data

a sf points object containing the IPHC data

survey_boundaries

a sf polygons object containing the survey boundary definitions

species

a character name of the species (linked to the variables 'N_it' in the dataframe)

M

the number of independent Monte Carlo samples from the posterior used to compute indices

return

logical stating whether or not to return indices as a data.frame

ICR_adjust

A logical determining if the ICR-based scale-factor adjustment should be used

cprop

the minimum proportion of baits needed to be removed to induce censorship. If >1 no censorship.

keep

a logical stating if you want to return the INLA model object. Useful for inspecting DIC, properties etc.,

use_upper_bound

a logical stating if right-censored or interval-censored response (with concervative upper bound derived using Baranov Catch equation) is desired.

upper_bound_quantile

a proportion stating which quantiles of observation to remove censorship from. If greater than 1, do not remove censorship from any observation

plot

logical. Do you want to return a ggplot of the indices along with the data.frame?

allyears

logical determining if upper bound quantile is computed uniquely for each year (if False) or over all years (if TRUE)

station_effects

logical stating if IID station-station random effects wanted

seed

the seed used for Monte Carlo sampling. Note that 0 means the result is non-reproducible, but the code can be significantly faster.

verbose

logical. If TRUE, print INLA diagnostics on the console as the model fits. Can help to diagnose convergence issues.

n_trajectories

integer specifying how many Monte Carlo sampled relative abundance indices to plot on a spaghetti plot. This can help with interpreting uncertainty. Suggested value 10.

preserve_inter_regional_differences

Logical if TRUE estimated inter-regional differences in mean abundance are shown at a cost of higher variance. Does not affect coastwide index.

mesh

an INLA::inla.mesh.2d object


pbs-assess/hookCompetition documentation built on April 27, 2023, 12:47 p.m.