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.03906170 0
#> b2minus -0.2174510 0.05447431 -0.35297539 0
#> b1plus 0.2231876 0.36718396 -0.06551365 0
#> b2plus 0.2512577 0.05665707 0.44459818 0
#>
#> estimated probability of acceptance:
#> [1] 0.5336179
#>
#> sample summary
#> alpha beta
#> Min. :0.7687 Min. : 4.819
#> 1st Qu.:1.7863 1st Qu.:10.559
#> Median :2.2476 Median :13.570
#> Mean :2.4180 Mean :14.449
#> 3rd Qu.:2.8059 3rd Qu.:16.964
#> Max. :8.6173 Max. :48.864
# 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.0003821 Min. :0.000733 Min. :0.001172
#> 1st Qu.:0.0329473 1st Qu.:0.034050 1st Qu.:0.034522
#> Median :0.0569804 Median :0.059663 Median :0.060469
#> Mean :0.0643621 Mean :0.064949 Mean :0.065908
#> 3rd Qu.:0.0892264 3rd Qu.:0.088067 3rd Qu.:0.091366
#> Max. :0.2478789 Max. :0.244621 Max. :0.285519