A wrapper function for makemov used to generate movement matrices for the operating model. Calculates a movement matrix from user-specified unfished stock biomass fraction in each area and probability of staying in the area in each time step.
Operating model, an object of class OM.
A vector of fractions of unfished stock in each area. The length of this vector will determine the
number of areas (nareas
) in the OM.
Mean probability of staying across all areas (single value) or a vector of the probability of individuals staying in each area (same length as dist).
Logit (normal) St.Dev error for sampling stock fractions from the fracs vector
Logit (normal) St.Dev error for sampling desired probability of staying either by area (prob is same length as dist) or the mean probability of staying (prob is a single number).
Optional vector as long as prob and dist. Upper bounds on uniform sampling of probability of staying, lower bound is prob.
Logical to indicate if the movement matrix will be plotted (mean values and range
across OM@nsim
simulations.)
A four-dimensional array of dimension c(nsim, maxage, nareas, nareas)
or a five-dimensional
array of dimension c(nsim, maxage, nareas, nareas, nyears + proyears)
specifying movement
in the operating model.
An age from 0 to maxage for the movement-at-age matrix figure when type = "matrix"
.
Whether to plot a movement matrix for a single age ("matrix"
) or the
full movement versus age figure ("all"
)
If mov
is a 5-dimensional array, the year (from 1 to nyears + proyears) for which
to plot movement.
The quantile to plot or report the range of values among simulations.
The operating model OM
with movement parameters in slot cpars
.
The mov
array is of dimension nsim
, maxage
, nareas
, nareas
.
simmov()
: Estimation function for creating movement matrix.
plot_mov()
: Plotting function.
Array mov
is age-specific, but currently the movement generated by simmov
is
independent of age.