sample_AddIerr: Sample additional index error

View source: R/sample_AddIerr.R

sample_AddIerrR Documentation

Sample additional index error

Description

This function adds log-normally distributed error to OM@cpars$AddIerr. It also sets the survey hyperdepletion/hyperstability parameter based on OM@beta. This is useful if you want to override the default of estimating hyperdepletion/hyperstability, observation error, and autocorrelation in the additional "real" indices as is done in MSEtool.

Usage

sample_AddIerr(om)

Arguments

om

A MSEtool operating model that has been run through SAMtool::RCM().

Value

A MSEtool operating model.

Examples

library(SAMtool)
om <- MSEtool::testOM
om@nsim <- 5
set.seed(1)
om <- RCM(om,
  data = list(Chist = runif(10), Index = runif(10), I_sd = rep(0.1, 10))
)
om2 <- sample_AddIerr(om@OM)
matplot(t(om2@cpars$AddIerr[,1,]), type = "l", lty = 1)

pbs-assess/ggmse documentation built on Nov. 21, 2023, 8:06 p.m.