run_meta_resamples | R Documentation |
This function performs meta-analyses on simulated animal tracking data, to estimate key movement metrics, such as mean home range area and/or mean movement speed for a sampled population. The function can also compare these metrics between two groups if specified.
When resampling is enabled, the function repeatedly draws random subsets of individuals from the available population to simulate how parameter estimates behave across varying population sample sizes. This resampling allows users to assess estimate variability as sample size increases or as individuals are resampled. For example, it can reveal if the mean home range area converges as more individuals are added to the sampled population.
This approach helps quantify the robustness and precision of estimated parameters under different sampling scenarios.
The function leverages core methods from the ctmm
package:
ctmm::akde()
: Computes home range areas using the Autocorrelated
Kernel Density Estimator (AKDE), which explicitly accounts for the
autocorrelation in animal movement data to produce statistically
robust space-use estimates.
ctmm::speed()
: Computes Continuous-Time Speed and Distance (CTSD)
estimates, providing biologically meaningful summaries of movement
speed, which is proportional to distance traveled.
These methods allow for robust comparisons across individuals,
groups, and resampling scenarios.
run_meta_resamples(
rv,
set_target = c("hr", "ctsd"),
subpop = FALSE,
random = FALSE,
max_draws = 100,
iter_step = 2,
trace = FALSE,
...
)
rv |
A named list containing simulation inputs, settings, and group assignments. Must not be NULL. |
set_target |
Character vector specifying the target metrics. Options are "hr" (for home range area) and/or "ctsd" (for movement speed). Defaults to c("hr", "ctsd"). |
subpop |
Logical; if TRUE, analyzes population-level inferences
by subpopulations/groups (e.g., males vs. females). Requires group
assigments in |
random |
Logical; if TRUE, performs random sampling of individuals using different combinations (up to max_draws). |
max_draws |
Integer; maximum number of random draws per
combination size when |
iter_step |
Integer. Step size used to increment the number of
individuals sampled in each iteration. For example, if
|
trace |
Logical; if TRUE, prints progress messages. Default is FALSE. |
... |
Additional arguments for advanced control:
|
A data frame summarizing all outputs for each target, population sample size, sample, and group (if specified). Columns include:
Research target, e.g., "hr" or "ctsd".
Number of individuals in the sample.
Sample index (for repeated draws).
True value.
Point estimate.
Lower confidence interval.
Upper confidence interval.
Relative error.
Lower CI for relative error.
Upper CI for relative error.
True group ratio (A/B), if subpop=TRUE.
Estimated group ratio.
Lower CI for estimated group ratio.
Upper CI for estimated group ratio.
Logical; whether estimate overlaps with the truth.
Logical; TRUE if grouped.
Group label ("All", "A", "B").
Logical; was a subpopulation detected?
Inês Silva i.simoes-silva@hzdr.de
akde
, speed
,
if(interactive()) {
run_meta_resamples(rv, set_target = "hr")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.