Summarize uncertainty for a vbdf objects. Analysis must have run with bootstrap iterations.
vb_uncertainty
is just an alias for vb_summary
.
vb_summary(
object,
type = c("discrete", "continuous", "binned"),
estimates = grep("prob|pr_turnout|pr_votedem|pr_voterep|cond_rep|net_rep",
names(object), value = TRUE),
na.rm = FALSE,
funcs = c("mean", "median", "low", "high"),
low_ci = 0.025,
high_ci = 0.975,
bin_col,
tolerance = sqrt(.Machine$double.eps)
)vb_uncertainty(
object,
type = c("discrete", "continuous", "binned"),
estimates = grep("prob|pr_turnout|pr_votedem|pr_voterep|cond_rep|net_rep",
names(object), value = TRUE),
na.rm = FALSE,
funcs = c("mean", "median", "low", "high"),
low_ci = 0.025,
high_ci = 0.975,
bin_col,
tolerance = sqrt(.Machine$double.eps)
)
A summary object with additional columns for each combination
of estimates
and funcs
.
a vbdf
object, usually the output of [vb_discrete], [vb_continuous], or [vb_difference].
a string naming the type of independent variable summary. Use
"binned"
when using the output of [vb_continuous] plus a binned version of the continuous bloc variable.
character vector naming columns for which to calculate uncertainty estimates.
logical indicating whether to remove NA
values in
estimates
.
character vector of summary functions to apply to
estimates
. Alternatively, supply your own list of functions, which
should accept a numeric vector input and return a scalar.
numeric. If you include the string "low"
in funcs
, then use this argument to control the lower bound of the confidence interval.
numeric. If you include the string "high"
in funcs
, then use this argument to control the upper bound of the confidence interval.
character vector naming the column(s) that define the bins. Used only when type
is "binned"
.
tolerance used when checking range of probability estimates