View source: R/stitch-survey.R
get_stitched_index | R Documentation |
Get stitched index across survey regions in synoptic trawl and HBLL surveys
get_stitched_index(
survey_dat,
species = "arrowtooth flounder",
survey_type = "synoptic",
model_type = "st-rw",
form = NULL,
family = sdmTMB::tweedie(),
time = "year",
spatial = "on",
spatiotemporal = "rw",
time_varying = NULL,
time_varying_type = NULL,
mesh = NULL,
cutoff = 20,
offset = "offset",
priors = sdmTMB::sdmTMBpriors(),
silent = TRUE,
ctrl = sdmTMB::sdmTMBcontrol(nlminb_loops = 1L, newton_loops = 1L),
gradient_thresh = 0.001,
cache = NULL,
check_cache = FALSE,
cache_predictions = FALSE,
cache_fits = FALSE,
survey_grid = NULL,
grid_dir
)
survey_dat |
A data frame from |
species |
A string specifying the |
survey_type |
A string matching one of: "synoptic" (the default), "hbll_outside", "hbll_inside". |
model_type |
A string matching one of: "st-rw" (the default), "st-rw_tv-rw", or "custom". |
form |
Optional string specifying model formula.
'catch ~ 1' (the default, unless |
family |
The family and link for |
time |
An optional time column name (as character), used in |
spatial |
Estimate spatial random fields? See |
spatiotemporal |
Estimate the spatiotemporal random fields, see |
time_varying |
An optional one-sided formula describing covariates that
should be modelled as a time-varying process. See |
time_varying_type |
Type of time-varying process to apply to
‘time_varying’ formula. See |
mesh |
Optional mesh object created using |
cutoff |
If |
offset |
A string naming the offset column in |
priors |
Optional penalties/priors used in |
silent |
A boolean. Silent or include optimization details. |
ctrl |
Optimization control options via |
gradient_thresh |
Threshold used in |
cache |
A string specifying file path to cache directory. |
check_cache |
Check whether index file already exists? Default = |
cache_predictions |
Cache model predictions? Can be large. |
cache_fits |
Cache model fits? Can be large. |
survey_grid |
A data frame containing the spatial grid over which predictions are to be made.
If |
grid_dir |
Path where cleaned grids were stored from |
Either a string or dataframe:
insufficient data to stitch regions
if the number of positive sets is too low to stitch
Failed sanity check
if the model failed to converge
A dataframe containing the stitched index formatted to use with gfplot::plot_survey_index()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.