
Preview plot for movedesign workflow outputs (single replicate)
Source:R/fct_main.R
md_plot_preview.Rd
Generates a quick visualization of relative error for home range or movement speed estimation from a single replicate of a movedesign workflow. This functions shows preliminary outputs only and should not be used to evaluate study design.
Use the output of md_run()
(a
movedesign_preprocess
object). Users should run md_replicate()
for
a full assessment.
Usage
md_plot_preview(obj, error_threshold = 0.05, pal = c("#007d80", "#A12C3B"))
Arguments
- obj
An object of class
movedesign_preprocess
(output ofmd_run()
).- error_threshold
Numeric. Error threshold (e.g.
0.05
for 5%) to display as a reference in the plot.- pal
Character vector of two colors for within/outside threshold (default: c("#007d80", "#A12C3B")).
Value
A ggplot object displaying relative error by population sample size, with point estimate and confidence intervals for mean estimates, and horizontal error threshold lines.
Details
For robust results and credible intervals, use md_replicate()
.
Examples
if (interactive()) {
input <- md_prepare(
data = buffalo,
models = models,
species = "buffalo",
n_individuals = 5,
dur = list(value = 1, unit = "month"),
dti = list(value = 1, unit = "day"),
add_individual_variation = TRUE,
grouped = TRUE,
set_target = "hr",
which_meta = "mean"
)
output <- md_run(input)
md_plot_preview(output, error_threshold = 0.05)
}