Learn R Programming

foieGras (version 0.7-6)

simfit: simulate animal tracks from a fG_ssm fit

Description

simulate from the rw or crw process models to generate either a set of x,y (or lon,lat) coordinates from a fG_ssm fit with length equal to the number of observations used in the SSM fit.

Usage

simfit(
  x,
  what = c("fitted", "predicted"),
  reps = 1,
  cpf = FALSE,
  sim_only = FALSE
)

Arguments

x

a compound fG_ssm model fit object (ignored if NULL)

what

simulate fitted (typically irregular in time) or predicted (typically regular in time) locations

reps

number of replicate tracks to simulate from an fG_ssm model fit object (ignored if x is NULL)

cpf

logical; should simulated tracks return to their start point (ie. a central-place forager)

sim_only

logical, do not include fG_ssm estimated location in output (default is FALSE)

Examples

Run this code
# NOT RUN {
fit <- fit_ssm(ellie, vmax = 4, model = "crw", time.step = 48, control = ssm_control(se = FALSE))
trs <- simfit(fit, reps = 2, what = "predicted")
plot(trs)

# }

Run the code above in your browser using DataLab