View source: R/Movement_calcs.R
simmov2 | R Documentation |
A wrapper function for makemov2 used to generate movement matrices for the operating model. Calculates a movement matrix from user-specified relative movement to other areas and probability of staying in the area in each time step.
simmov2(
OM,
dist = c(0.05, 0.6, 0.35),
distE = 0.01,
frac_other = matrix(c(NA, 2, 1, 3, NA, 1, 1, 4, NA), nrow = 3, byrow = T),
frac_otherE = 0.01,
prob = 0.8,
probE = 1,
figure = TRUE
)
OM |
Operating model, an object of class OM. |
dist |
A vector of fractions of unfished stock in each area. The length of this vector will determine the
number of areas ( |
distE |
Logit (normal) St.Dev error for sampling desired fraction in each area |
frac_other |
A matrix (nareas rows from, nareas columns to) of relative fractions moving to other areas (the positive diagonal (staying) is unspecified). |
frac_otherE |
Logit (normal) St.Dev error for sampling desired fraction moving to other areas. |
prob |
the mean probability of staying in the same area among all areas |
probE |
Logit (normal) St.Dev error for sampling desired probability of staying in each area |
figure |
Logical to indicate if the movement matrix will be plotted (mean values and range
across |
The operating model OM
with movement parameters in slot cpars
.
The mov
array is of dimension nsim
, maxage
, nareas
, nareas
.
simmov2()
: Estimation function for creating movement matrix.
Array mov
is age-specific, but currently the movement generated by simmov
is
independent of age.
T. Carruthers and Q. Huynh
## Not run:
movOM_3areas <- simmov2(testOM, frac_other = matrix(c(NA,2,1, 2,NA,1, 1,2,NA),
nrow=3, byrow=T), frac_otherE = 0.01, prob = 0.8, probE = 0.3)
# sim 1, age 1, movement from areas in column i to areas in row j
movOM_3areas@cpars$mov[1, 1, , ]
plot_mov(movOM_3areas@cpars$mov)
plot_mov(movOM_3areas@cpars$mov, type = "all")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.