get_pstar | R Documentation |
Fits a Generalized Additive Model (GAM) and calculates the breakdown point (pstar) of observed catch counts due to hook competition.
get_pstar(
survey_dat,
gam_formula,
survey_type,
prop_removed_min = NULL,
h = 0.005,
pstar_cache = NULL,
save_out = TRUE
)
survey_dat |
A dataframe from |
gam_formula |
A string or formula specifying the generalised additive used to estimate pstar. (See Watson et al. 2023).
|
survey_type |
A string specifying the survey type: "iphc", "hbll_outside", or "hbll_inside". |
prop_removed_min |
Optional. Minimum value of proportion of baits removed
for generating predictions. If not provided, uses the minimum value found in
|
h |
Step size for the central difference approximation (default = 0.005). |
pstar_cache |
Path to a folder for caching pstar objects. |
save_out |
Whether to save the pstar object to #' @references Watson, J., Edwards, A.M., and Auger-Méthe M. 2023. A statistical censoring approach accounts for hook competition in abundance indices from longline surveys. Can. J. Fish. Aquat. Sci. 80(3): 468-486. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1139/cjfas-2022-0159")} |
A list of objects containing
gam_fit
: The fitted GAM object.
pred_df
: A data frame with predicted values from gam_fit
f1
: A data frame containing the numerical approximation of the first derivative
pstar_df
: A data frame with the estimated pstar value.
species
: A character vector containing the species name.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.