sim_survey {SimSurvey} | R Documentation |
Simulate stratified-random survey
Description
Simulate stratified-random survey
Usage
sim_survey(
sim,
n_sims = 1,
q = sim_logistic(),
trawl_dim = c(1.5, 0.02),
resample_cells = FALSE,
binom_error = TRUE,
min_sets = 2,
set_den = 2/1000,
lengths_cap = 500,
ages_cap = 10,
age_sampling = "stratified",
age_length_group = 1,
age_space_group = "division",
custom_sets = NULL,
light = TRUE
)
Arguments
sim |
Simulation from |
n_sims |
Number of surveys to simulate over the simulated population. Note: requesting
a large number of simulations may max out your RAM. Use
|
q |
Closure, such as |
trawl_dim |
Trawl width and distance (same units as grid) |
resample_cells |
Allow resampling of sampling units (grid cells)? Setting to TRUE may introduce bias because depletion is imposed at the cell level. |
binom_error |
Impose binomial error? Setting to FALSE may introduce bias in stratified estimates at older ages because of more frequent rounding to zero. |
min_sets |
Minimum number of sets per strat |
set_den |
Set density (number of sets per grid unit squared). WARNING:
may return an error if |
lengths_cap |
Maximum number of lengths measured per set |
ages_cap |
If |
age_sampling |
Should age sampling be "stratified" (default) or "random"? |
age_length_group |
Numeric value indicating the size of the length bins for stratified
age sampling. Ignored if |
age_space_group |
Should age sampling occur at the "division" (default), "strat" or "set" spatial scale?
That is, age sampling can be spread across each "division", "strat" or "set"
in each year to a maximum number within each length bin (cap is defined using
the |
custom_sets |
Supply an object of the same structure as returned by |
light |
Drop some objects from the output to keep object size low? |
Value
A list including rounded population simulation, set locations and details and sampling details. Note that that N = "true" population, I = population available to the survey, n = number caught by survey.
Examples
sim <- sim_abundance(ages = 1:5, years = 1:5) %>%
sim_distribution(grid = make_grid(res = c(20, 20))) %>%
sim_survey(n_sims = 5, q = sim_logistic(k = 2, x0 = 3))
plot_survey(sim, which_year = 3, which_sim = 1)