Description Usage Arguments Details Value Examples
Simulate Tag Recovery Data
1 |
data |
|
parameters |
|
settings |
|
The list()
argument data
must contain:
x
An integer matrix of tag release counts formatted
as described in mmmTags()
.
y
An integer matrix of tag recovery counts formatted
as described in mmmTags()
.
z
A square binary index matrix that indicates allowed
direct movement between areas (from rows to columns) from one
time step to the next. Ones off the diagonal indicate allowed
direct movement. Zeros off the diagonal represent disallowed
direct movement. Numbers on the diagonal are ignored because
self-movement is always allowed. See mmmIndex()
.
h
The (positive) scalar instantaneous tag loss rate.
u
The scalar proportion of tags lost during release.
The list argument data
may optionally contain:
l
A matrix of tag reporting rates (proportions).
Defaults to one if omitted (full reporting). See mmmRates()
.
w
A matrix of fishing mortality rate weights. Useful
when the tag time step is finer than the fishing rate step.
Defaults to one (equal fishing rates across tag time steps
within a fishing rate time step). See mmmWeights()
.
f
A matrix of fishing mortality rates. Must be included
in data
or parameters
. See mmmRates()
.
m
The scalar instantaneous natural mortality rate.
Must be included in data
or parameters
.
The list()
argument parameters
must contain:
p
An array of movement parameters. See
create_movement_parameters()
.
The list argument parameters
may optionally contain:
f
A matrix of fishing mortality rates. Must be included
in data
or parameters
. See mmmRates()
.
m
The scalar instantaneous natural mortality rate.
Must be included in data
or parameters
.
An object of class mmmSim
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Data
sim_x <- create_release_matrix()
sim_z <- mmmIndex(3, pattern = 1)
sim_f <- as.matrix(0.04)
sim_m <- 0.1
sim_h <- 0.02
sim_u <- 0.1
# Parameters
v <- c(0.9, 0.1, 0.0, 0.1, 0.8, 0.3, 0.0, 0.1, 0.7)
sim_r <- array(v, dim = c(3,3,1,1))
sim_p <-create_movement_parameters(sim_r, sim_z)
# Simulation
data <- list(
x = sim_x,
z = sim_z,
f = sim_f,
m = sim_m,
h = sim_h,
u = sim_u)
parameters <- list(p = sim_p)
s1 <- mmmSim(data, parameters)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.