sim_contin: simulation function for mark-recovery setting

View source: R/sim_contin.R

sim_continR Documentation

simulation function for mark-recovery setting

Description

This function allows you to simulate data of dead recoveries with specified survival, migratory connectivity and recovery probability in 1D- or 2D-space and time using rejection sampling.

Usage

sim_contin(mark_recapture_object, res = 100)

Arguments

mark_recapture_object

object of class mark_recapture_object (see mark_recapture_object())

res

spatial resolution. Defaults to 100.

Value

returns object of class mark_recapture_object with added simulated recovery data

Examples

{
  mro <- mark_recapture_object(xrange = c(0, 1),
  survival = function(w) {
  stmp <- function(w) 0.5 * w + .4
  stmp(w / 100222.8)
  },
  recovery = function(w) 0.1,
  migratory_connectivity = function(b, w, B = 3) {
  mtmp <- function(b, w, B = B) {
  truncnorm::dtruncnorm(w, 0, 1,
  mean = seq(0.1, 0.9,
  length.out = B)[b],
  sd = 0.3)
  }
  mtmp(b, w / 100222.8, B)
  },
  marked_individuals = rep(1000, 3),
  observation_time = 3, robust = TRUE)
  mro <- sim_contin(mro)
}


SaskiaSchirmer/CONSURE documentation built on Sept. 3, 2023, 8:52 a.m.