param_estimates_compare: Compare parameter estimates

param_estimates_compareR Documentation

Compare parameter estimates

Description

Summarizes the parameter estimates from tibble like what's returned from param_estimates_batch(), showing you the quantiles passed to probs, likely interpreted as confidence intervals for your parameter estimates. Optionally takes an "original model" to compare these quantiles against. Originally conceived for comparing a model to multiple runs of the "same" model, for example in a bootstrap or simulation.

Usage

param_estimates_compare(
  .param_df,
  .orig_mod = NULL,
  .compare_cols = starts_with(c("THETA", "SIGMA", "OMEGA")),
  probs = c(0.5, 0.025, 0.975),
  na.rm = FALSE
)

Arguments

.param_df

A tibble with columns for each parameter and rows for each model (like what's returned from param_estimates_batch())

.orig_mod

bbi_model object to compare .param_df against. If NULL, the default, only returns quantiles from .param_df. If passed, will display an additional original_estimate column.

.compare_cols

An expression that can be passed to dplyr::select() to select which columns in .param_df will be pivoted and summarized. Defaults to dplyr::starts_with(c("THETA", "SIGMA", "OMEGA")) (designed for NONMEM runs), but consider using dplyr::matches() to select columns using regex. Also see ?tidyselect::language for more details and options.

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 .param_df.

na.rm

Logical scalar, passed through to stats::quantile().

Value

A tibble with the first column containing the parameter names (that were column names in .param_df), the second column optionally containing original parameter estimates (if .orig_mod is passed), and subsequent columns containing the quantiles specified in probs. You can think of this as essentially .param_df, summarized by quantiles across all rows, and then pivoted.


metrumresearchgroup/rbabylon documentation built on April 21, 2024, 3:26 a.m.