summary
method for class "hef".
an object of class "hef", a result of a call to
hef
.
Additional arguments passed on to summary.ru
.
A character scalar.
If params = "hyper"
then the posterior samples of all
hyperparameter values in \(\phi\) are summarized using
summary.ru
.
If params = "pop"
then only posterior samples of the populations
specified in which_pop
are summarized.
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.
# 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.5149331
#>
#> sample summary
#> alpha beta
#> Min. :0.7127 Min. : 4.389
#> 1st Qu.:1.7737 1st Qu.:10.460
#> Median :2.1999 Median :13.093
#> Mean :2.3559 Mean :14.092
#> 3rd Qu.:2.7911 3rd Qu.:16.709
#> Max. :7.2114 Max. :45.562
# 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.000287 Min. :0.0003018 Min. :0.0008493
#> 1st Qu.:0.031620 1st Qu.:0.0337496 1st Qu.:0.0342071
#> Median :0.055319 Median :0.0553616 Median :0.0547074
#> Mean :0.063507 Mean :0.0641186 Mean :0.0631619
#> 3rd Qu.:0.086478 3rd Qu.:0.0850060 3rd Qu.:0.0840031
#> Max. :0.227535 Max. :0.2772403 Max. :0.2685869