Learn R Programming

SimSurvey

The SimSurvey package has been designed to facilitate simulations of sample surveys of spatially-correlated age-structured populations. Sample surveys have become an integral part of the population monitoring programs led by many fisheries organizations and, as with any other monitoring program, good survey design and analysis is a critical prerequisite for obtaining reliable results. It has long been recognized that simulations are a useful tool for optimizing such surveys and, as such, several frameworks have been proposed and applied to try and answer the common question of "how much sampling is enough?". The SimSurvey package builds upon previous frameworks by increasing the complexity of the simulated population to reflect the dynamic structure seen in fish populations and extends the accessibility of the underlying simulation by wrapping it in an open-source R package.

Installation

Install from CRAN:

install.packages("SimSurvey")

Or install the development version from GitHub:

install.packages("remotes")
remotes::install_github("PaulRegular/SimSurvey")

Documentation

pkgdown site: https://paulregular.github.io/SimSurvey/
PLOS ONE journal article: https://doi.org/10.1371/journal.pone.0232822

Copy Link

Version

Install

install.packages('SimSurvey')

Monthly Downloads

283

Version

0.1.6

License

GPL-3

Maintainer

Paul Regular

Last Published

September 19th, 2023

Functions in SimSurvey (0.1.6)

strat_data

Prepare simulated data for stratified analysis
sim_nlf

Define a non-linear relationship
sim_distribution

Simulate spatial and temporal distribution
sim_logistic

Closure for simulating logistic curve
sim_sets

Simulate survey sets
sim_survey

Simulate stratified-random survey
sim_vonB

Closure for simulating length given age using von Bertalanffy notation
sim_survey_parallel

Simulate stratified random surveys using parallel computation
sim_ays_covar_spde

Simulate age-year-space covariance using SPDE approach
strat_error

Calculate error of stratified estimates
vis_sim

Make a flexdashboard for visualizing the simulation
sim_parabola

Define a parabolic relationship
test_surveys

Test sampling design of multiple surveys using a stratified analysis
survey_mesh

Sample survey meshes and related items
survey_lite_mesh

Lite sample survey mesh and related items
strat_means

Calculate stratified means, variances and confidence intervals across groups
survey_grid

Sample survey simulation grid.
bathy

Southern Newfoundland bathymetry
convert_N

Convert abundance-at-age matrix to abundance-at-length
icc

Calculate intraclass correlation
expand_surveys

Set-up a series of surveys from all combinations of settings supplied
fibonacci

Generate Fibonacci sequence
error_stats

Calculate common error statistics
make_grid

Make a depth stratified survey grid
group_lengths

Convert length to length group
sim_R

Simulate starting abundance, random recruitment and total mortality
round_sim

Round simulated population
sim_ays_covar

Simulate age-year-space covariance
run_strat

Run stratified analysis on simulated data
sim_abundance

Simulate basic population dynamics model
make_mesh

Make an R-INLA mesh based off a grid
plot_trend

Simple plotting functions
land

Southern Newfoundland coastline
.Q

Helper function to generate precision matrix Q for simulation
reexports

Objects exported from other packages
object_size

Print object size