sim_contin | R Documentation |
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.
sim_contin(mark_recapture_object, res = 100)
mark_recapture_object |
object of class mark_recapture_object (see mark_recapture_object()) |
res |
spatial resolution. Defaults to 100. |
returns object of class mark_recapture_object with added simulated recovery data
{
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)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.