fitting_model | R Documentation |
This function fits continuous-time movement models to simulated location
data using the ctmm
package. It estimates movement parameters for each
simulated trajectory, optionally running in parallel for efficiency. It
supports both home range and speed estimation workflows.
fitting_model(obj, set_target = c("hr", "ctsd"), ...)
obj |
A list of simulated movement datasets, each formatted as a
|
set_target |
A character vector specifying the research goals. Options include:
|
... |
Optional control parameters passed via |
The function generates initial parameter estimates for each dataset
using ctmm::ctmm.guess()
. If the data includes simulated location
error, it uses an error model accordingly. When .check_sampling
is
TRUE
, it compares the sampling duration and interval against optimal
thresholds derived from the provided autocorrelation timescales.
Models are fitted using ctmm::ctmm.select()
, which performs model
selection to find the best-fit movement process. If .rerun
is
enabled, the function identifies simulations with effective
sample sizes below 0.1 and attempts to reselect models for those.
Finally, all fitted models are recentered to (0, 0
) for downstream
consistency.
The following arguments can be supplied via ...
:
.dur
: A list with elements value
(numeric) and unit
(string),
specifying the maximum study duration. Example:
list(value = 2, unit = "months")
.
.dti
: A list with elements value
(numeric) and unit
(string),
specifying the intended sampling interval. Example:
list(value = 1, unit = "day")
.
.tau_p
: A list of position autocorrelation timescales. Optional,
but required if .check_sampling = TRUE
.
.tau_v
: A list of velocity autocorrelation timescales. Optional,
but required if .check_sampling = TRUE
.
.error_m
: A numeric value specifying location error in meters
(used for simulation).
.check_sampling
: Logical; if TRUE
, checks whether the sampling
schedule meets minimum requirements for reliable model fitting via
ctmm::ctmm.fit()
. This feature is experimental and may change
in future versions.
.rerun
: Logical; if TRUE
, re-runs model selection when
simulations result in very low effective sample sizes, to
avoid convergence issues.
.parallel
: Logical; if TRUE
, enables parallel computation.
.trace
: Logical; if TRUE
, print progress and timing
messages to the console.
A list of fitted movement models (class ctmm
), one per simulation.
Each model is recentered to the origin (x = 0
, y = 0
).
This function is intended for internal use and may assume inputs follow specific structure and constraints not referenced explicitly.
ctmm::ctmm.guess()
, ctmm::ctmm.select()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.