Performs Leave-One-Out Cross-Validation (LOOCV) on hierarchical model outputs to assess the influence of individual simulated animals on population-level estimates. Supports analyses with or without groups.
In each iteration, the function removes one individual, refits the hierarchical model to the remaining dataset, and recalculates the target population-level estimates. This process is repeated until every individual has been excluded once.
This approach provides insight into how sensitive overall conclusions are to specific individuals. This helps identify influential individuals and assess robustness.
run_meta_loocv(
rv,
set_target = c("hr", "ctsd"),
subpop = FALSE,
trace = FALSE,
...
)A data frame containing summarized simulation outputs.
A reactiveValues object or list containing simulation
inputs, fitted models, and (optionally) group assignments.
Character vector specifying the target metrics.
Options are "hr" for home range area and/or "ctsd" for movement
speed. Defaults to c("hr", "ctsd").
Logical; if TRUE, analyzes population-level inferences
by groups (e.g., males vs. females). Requires valid group
assigments in rv.
Logical; if TRUE, prints progress and diagnostic
messages. Default is FALSE.
Additional arguments for advanced control:
Logical. If TRUE, runs the meta-analysis
only at the maximum population sample size, skipping all
intermediate sample sizes.
Integer. Displays a progress bar.
Integer. Specifies exact sample size to use. Overrides automatic sequence generation. Accepts a single value.
List (optional); supplies precomputed input objects,
typically created via .build_meta_objects().
Inês Silva i.simoes-silva@hzdr.de
if(interactive()) {
run_meta_loocv(rv, set_target = "hr")
}
Run the code above in your browser using DataLab