sim | R Documentation |
simulate from the rw
, crw
, or mp
process models
to generate a set of x,y
(or lon,lat
) coordinates with or without error
from supplied input parameters.
sim(
N = 100,
start = list(c(0, 0), as.POSIXct(format(Sys.time(), tz = "UTC", usetz = TRUE))),
model = c("rw", "crw", "mp"),
vmax = 4,
sigma = c(4, 4),
rho_p = 0,
D = 0.05,
sigma_g = 1.25,
error = c("ls", "kf"),
tau = c(1.5, 0.75),
rho_o = 0,
tdist = c("reg", "gamma"),
ts = 6,
tpar = 1.2,
alpha = c(0.9, 0.8)
)
N |
number of time steps to simulate |
start |
coordinates and datetime of start location for simulated track |
model |
simulate from the |
vmax |
maximum travel rate (m/s) of simulated animal |
sigma |
a vector of process error sd's for the |
rho_p |
correlation parameter for |
D |
diffusion coefficient for |
sigma_g |
random walk sd for time-varying move persistence parameter
(ignored if |
error |
indicates whether measurement error should mimic Argos
Least-Squares ( |
tau |
vector of LS measurement error sd's (ignored if |
rho_o |
correlation parameter for LS covariance matrix
(ignored if |
tdist |
distribution for simulating location times ( |
ts |
time interval in h |
tpar |
rate parameter for the gamma distributed times, shape is take to be
|
alpha |
transition probabilities switching model versions of
|
a tibble is returned with columns that can include some or all of the following, depending on the arguments used
date
time as POSIXct, tz = UTC (default)
lc
Argos location class
lon
longitude with error
lat
latitude with error
x
x in km from arbitrary origin without error
y
y in km from arbitrary origin without error
x.err
a random deviate drawn from Argos LS or KF error distribution
y.err
a random deviate drawn from Argos LS or KF error distribution
smaj
Argos error ellipse semi-major axis in m (if error = "kf"
)
smin
Argos error ellipse semi-minor axis in m (if error = "kf"
)
eor
Argos error ellipse orientation in degrees (if error = "kf"
)
u
velocity in x direction (if model = "crw"
), unit = km/h
v
velocity in y direction (if model = "crw"
), unit = km/h
b
behavioural state (if model = "rw"
or model = "crw"
and multiple process variances given, see examples)
g
movement persistence - the autocorrelation between successive movements on the interval 0,1 (if model = "mp"
)
tr <- sim(N = 200, model = "crw", D = 0.1, error = "kf", tdist = "reg", ts=12)
plot(tr, error = TRUE)
tr <- sim(N = 200, model = "mp", sigma_g = 1.2, error = "ls", tau = c(2, 1.5), ts=12,
tdist = "gamma", tpar = 1.5)
plot(tr, error = TRUE, pal = "Cividis")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.