summary.hef {bang}R Documentation

Summarizing hef objects

Description

summary method for class "hef".

Usage

## S3 method for class 'hef'
summary(object, ..., params = c("hyper", "pop"),
  which_pop = 1:ncol(object$theta_sim_vals))

Arguments

object

an object of class "hef", a result of a call to hef.

...

Additional arguments passed on to summary.ru.

params

A character scalar.

If params = "hyper" then the posterior samples of all hyperparameter values in φ are summarized using summary.ru.

If params = "pop" then only posterior samples of the populations specified in which_pop are summarized.

which_pop

An integer vector. If params = "pop" then which_pop indicates which populations, i.e. which columns of object$theta_sim_vals to summarize, using summary. The default is all populations.

Examples

# Beta-binomial model, rat data
rat_res <- hef(model = "beta_binom", data = rat)

# Posterior summaries of the hyperparameters alpha and beta
summary(rat_res)

# Posterior summaries of the binomial probability for rats 1 to 3
summary(rat_res, params = "pop", which_pop = 1:3)

[Package bang version 1.0.1 Index]