get_fitted: get_fitted returns df of observed bycatch estimates (lambda...

View source: R/get_fitted.R

get_fittedR Documentation

get_fitted returns df of observed bycatch estimates (lambda of Poisson), accounting for effort but not accounting for observer coverage

Description

get_fitted returns df of observed bycatch estimates (lambda of Poisson), accounting for effort but not accounting for observer coverage

Usage

get_fitted(fitted_model, alpha = 0.05)

Arguments

fitted_model

Data and fitted model returned from fit_bycatch(). If a hurdle model, then only then the plot returns the total bycatch rate (including zero and non-zero components).

alpha

The alpha level for the credible interval, defaults to 0.05

Value

plot called from ggplot

Examples


d <- data.frame(
  "Year" = 2002:2014,
  "Takes" = c(0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0),
  "expansionRate" = c(24, 22, 14, 32, 28, 25, 30, 7, 26, 21, 22, 23, 27),
  "Sets" = c(391, 340, 330, 660, 470, 500, 330, 287, 756, 673, 532, 351, 486)
)
fit <- fit_bycatch(Takes ~ 1,
  data = d, time = "Year", effort = "Sets",
  family = "poisson", time_varying = FALSE
)
get_fitted(fit)


ericward-noaa/bycatch documentation built on July 19, 2023, 6:10 p.m.