summary method for class "hef".
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 \(\phi\) are summarized usingsummary.ru.If
params = "pop"then only posterior samples of the populations specified inwhich_popare summarized.- which_pop
An integer vector. If
params = "pop"thenwhich_popindicates which populations, i.e. which columns ofobject$theta_sim_valsto summarize, usingsummary. 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)
#> ru bounding box:
#> box vals1 vals2 conv
#> a 1.0000000 0.00000000 0.00000000 0
#> b1minus -0.2382163 -0.40313465 -0.03906169 0
#> b2minus -0.2174510 0.05447431 -0.35297538 0
#> b1plus 0.2231876 0.36718395 -0.06551365 0
#> b2plus 0.2512577 0.05665707 0.44459818 0
#>
#> estimated probability of acceptance:
#> [1] 0.5277045
#>
#> sample summary
#> alpha beta
#> Min. : 0.8054 Min. : 4.808
#> 1st Qu.: 1.7388 1st Qu.:10.296
#> Median : 2.1945 Median :13.099
#> Mean : 2.4033 Mean :14.327
#> 3rd Qu.: 2.8016 3rd Qu.:16.730
#> Max. :10.5493 Max. :55.273
# Posterior summaries of the binomial probability for rats 1 to 3
summary(rat_res, params = "pop", which_pop = 1:3)
#> p[1] p[2] p[3]
#> Min. :0.001522 Min. :0.0005025 Min. :0.0003723
#> 1st Qu.:0.031576 1st Qu.:0.0316907 1st Qu.:0.0313851
#> Median :0.055558 Median :0.0546739 Median :0.0548144
#> Mean :0.062533 Mean :0.0628370 Mean :0.0631815
#> 3rd Qu.:0.085518 3rd Qu.:0.0865366 3rd Qu.:0.0853328
#> Max. :0.246239 Max. :0.2300442 Max. :0.2565092