Summarizes each parameter estimate, showing you the quantiles passed to
probs, and optionally the estimates of .orig_mod.
Usage
param_estimates_compare(
.boot_sum,
.orig_mod = NULL,
.compare_cols = starts_with(c("THETA", "SIGMA", "OMEGA")),
probs = c(0.5, 0.025, 0.975),
na.rm = FALSE
)
# S3 method for class 'bbi_nmboot_summary'
param_estimates_compare(
.boot_sum,
.orig_mod = NULL,
.compare_cols = NULL,
probs = c(0.5, 0.025, 0.975),
na.rm = FALSE
)
# Default S3 method
param_estimates_compare(
.boot_sum,
.orig_mod = NULL,
.compare_cols = starts_with(c("THETA", "SIGMA", "OMEGA")),
probs = c(0.5, 0.025, 0.975),
na.rm = FALSE
)Arguments
- .boot_sum
Either a
bbi_nmboot_summaryobject, or a tibble with columns for each parameter and rows for each model (like what's returned fromparam_estimates_batch()).- .orig_mod
bbi_modelobject to compare.boot_sumagainst. This will be automatically set if passing in abbi_nmboot_summaryobject.- .compare_cols
An expression that can be passed to
dplyr::select()to select which columns in.boot_sumwill be pivoted and summarized. See ?tidyselect::language for more details and options. Only used if.boot_sumis a tibble.- probs
Numeric vector with values between 0 and 1 to be passed through to
stats::quantile(). Represents the quantiles to calculate for parameter estimates in.boot_sum.- na.rm
Logical scalar, passed through to
stats::quantile().
Value
A tibble containing quantiles for each parameter estimate, optionally
compared to the estimates from .orig_mod.
Examples
if (FALSE) { # \dontrun{
# Via a bootstrap run
boot_run <- read_model(file.path(MODEL_DIR, "1-boot"))
boot_sum <- summarize_bootstrap_run(boot_run)
param_estimates_compare(boot_sum)
# Via a custom table
orig_mod <- read_model(file.path(MODEL_DIR, "1"))
param_df <- param_estimates_batch(MODEL_DIR)
param_estimates_compare(param_df, .orig_mod = orig_mod)
} # }
