sim_fit | R Documentation |
ssm
fitsimulate from the rw
or crw
process models to generate
either a set of x,y or lon,lat coordinates from a ssm
fit with length
equal to the number of observations used in the SSM fit.
sim_fit(
x,
what = c("fitted", "predicted"),
reps = 1,
start = NULL,
end = NULL,
grad = NULL,
beta = c(-300, -300),
cpf = FALSE,
sim_only = FALSE
)
x |
a |
what |
simulate fitted (typically irregular in time) or predicted (typically regular in time) locations |
reps |
number of replicate tracks to simulate from an |
start |
a 2-element vector for the simulated track start location (lon,lat or x,y) |
end |
a 2-element vector for the simulated track end location (lon,lat or x,y) |
grad |
a SpatRaster of x- and y-gradients as separate layers (see details) |
beta |
a 2-element vector of parameters defining the potential function
magnitude in x- and y-directions (ignored if |
cpf |
logical; should simulated tracks return to their start point (ie. a central-place forager) |
sim_only |
logical, do not include |
A potential function can be applied to the simulated paths to help
avoid locations on land (or in water), using the grad
and beta
arguments. A coarse-resolution rasterStack of global x- and y-gradients of
distance to land are provided. Stronger beta parameters result in stronger
land (water) avoidance but may also introduce undesirable/unrealistic artefacts
(zig-zags) in the simulated paths. See Brillinger et al. (2012) and
vignette("momentuHMM", package = "momentuHMM")
for more details on the
use of potential functions for simulating constrained animal movements.
WARNING: This application of potential functions to constrain simulated
paths is experimental, likely to change in future releases, and NOT guaranteed
to work enitrely as intended, especially if cpf = TRUE
!
a fG_sim_fit
object containing the paths simulated from a
ssm
fit object
Brillinger DR, Preisler HK, Ager AA, Kie J (2012) The use of potential functions in modelling animal movement. In: Guttorp P., Brillinger D. (eds) Selected Works of David Brillinger. Selected Works in Probability and Statistics. Springer, New York. pp. 385-409.
fit <- fit_ssm(ellie, model = "crw", time.step = 24)
trs <- sim_fit(fit, what = "predicted", reps = 3)
plot(trs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.