View source: R/bmult_S3methods.R
summary.bmult | R Documentation |
bmult
Summarizes results from Bayes factor analysis
## S3 method for class 'bmult' summary(object, ...)
object |
object of class |
... |
additional arguments, currently ignored |
Invisibly returns a list
which contains the Bayes factor and associated hypotheses for the full
model, but also the separate for the independent equality and inequality constraints.
The summary method returns a list
with the following elements:
$hyp
Vector containing the informed hypothesis as specified by the user
$bf
Contains Bayes factor
$logmlHe
Contains log marginal likelihood of the encompassing model
$logmlH0
Contains log marginal likelihood of the null model
$logmlHr
Contains log marginal likelihood of the informed model
$re2
Contains relative mean-square error for the Bayes factor
$bf_type
Contains Bayes factor type as specified by the user
$cred_level
Credible interval for the posterior point estimates.
$prior
List containing the prior parameters.
$data
List containing the data.
$nr_equal
Number of independent equality-constrained hypotheses.
$nr_inequal
Number of independent inequality-constrained hypotheses.
$estimates
Parameter estimates for the encompassing model
factor_level
: Vector with category names
alpha
: Vector with posterior concentration parameters of Dirichlet
distribution (for multinomial models) or alpha parameters for independent beta
distributions (for binomial models)
beta
: Vector with beta parameters for independent beta
distributions (for binomial models)
lower
: Lower value of credible intervals of marginal beta distributions
median
: Posterior median of marginal beta distributions
upper
: Upper value of credible intervals of marginal beta distributions
# data x <- c(3, 4, 10, 11) n <- c(15, 12, 12, 12) # priors a <- c(1, 1, 1, 1) b <- c(1, 1, 1, 1) # informed hypothesis factor_levels <- c('theta1', 'theta2', 'theta3', 'theta4') Hr <- c('theta1', '<', 'theta2', '<', 'theta3', '<', 'theta4') ## Binomial Case out_binom <- binom_bf_informed(x=x, n=n, Hr=Hr, a=a, b=b, niter=1e3,factor_levels, seed=2020) summary(out_binom) ## Multinomial Case out_mult <- mult_bf_informed(x=x, Hr=Hr, a=a, niter=1e3,factor_levels, seed=2020) summary(out_mult)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.