Skip to contents

Runs the programme of run_survey() R times: in each replicate the same design is rolled and raised in every survey year. The result holds the estimates of every replicate by stratum, so the spread of the estimates can be compared with the true catch and effort year by year.

Usage

spin_series(
  fishery,
  design = cas_design(),
  years = utils::tail(fishery$years, 5),
  R = 100,
  artefacts = NULL,
  frame = c("annual", "first"),
  route = "psu",
  seed = 1,
  progress = NULL
)

Arguments

fishery

A cas_fishery.

design

A cas_design.

years

Survey years (default: the last 5).

R

Number of replicates.

artefacts

A cas_artefacts, or NULL.

frame

"annual" (a new frame survey every year) or "first" (the frame survey of the first survey year is used throughout, so it goes out of date as boats enter and leave).

route

Estimation route (see estimate_catch()).

seed

Seed.

progress

Optional function called with the replicate number.

Value

A cas_spins with catch (one row per replicate, year, quarter, site type, segment and species: estimate, se, true, in kg), effort (the same without species: trips), and the settings.

Examples

if (FALSE) {
fish <- cas_fishery(island_x(), seed = 1)
sp <- spin_series(fish, cas_design(), R = 50)
plot_spin_series(sp)
plot_spin_series(sp, what = "effort")
head(spins_long(sp))
}