summary() methods for fits, posteriors, and samples, plus
as.data.frame() for posterior draws so results drop straight into
data-frame workflows (dplyr, ggplot2, ...).
Usage
# S3 method for class 'nsbi_samples'
as.data.frame(x, row.names = NULL, optional = FALSE, ...)
# S3 method for class 'nsbi_samples'
summary(object, probs = c(0.025, 0.25, 0.5, 0.75, 0.975), ...)
# S3 method for class 'nsbi_posterior'
summary(object, n = 1000L, x = NULL, ...)
# S3 method for class 'nsbi_npe'
summary(object, ...)Arguments
- x
Observation to condition on (defaults to the posterior's
x_obs); foras.data.frame(), the samples object.- row.names, optional
Standard
as.data.frame()arguments.- ...
Additional arguments passed to methods.
- object
An
nsbi_samplesmatrix fromsample(), annsbi_posterior, or annsbi_npefit.- probs
Quantiles to report.
- n
Number of draws used to summarize a posterior.
