https://github.com/cran/bayestestR
Tip revision: 518b36389d0fed852405c07f9d26b0702f09a794 authored by Dominique Makowski on 17 October 2024, 11:40:02 UTC
version 0.15.0
version 0.15.0
Tip revision: 518b363
describe_prior.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/describe_prior.R
\name{describe_prior}
\alias{describe_prior}
\alias{describe_prior.brmsfit}
\title{Describe Priors}
\usage{
describe_prior(model, ...)
\method{describe_prior}{brmsfit}(
model,
effects = c("fixed", "random", "all"),
component = c("conditional", "zi", "zero_inflated", "all", "location",
"distributional", "auxiliary"),
parameters = NULL,
...
)
}
\arguments{
\item{model}{A Bayesian model.}
\item{...}{Currently not used.}
\item{effects}{Should results for fixed effects, random effects or both be
returned? Only applies to mixed models. May be abbreviated.}
\item{component}{Should results for all parameters, parameters for the
conditional model or the zero-inflated part of the model be returned? May
be abbreviated. Only applies to \pkg{brms}-models.}
\item{parameters}{Regular expression pattern that describes the parameters
that should be returned. Meta-parameters (like \code{lp__} or \code{prior_}) are
filtered by default, so only parameters that typically appear in the
\code{summary()} are returned. Use \code{parameters} to select specific parameters
for the output.}
}
\description{
Returns a summary of the priors used in the model.
}
\examples{
\donttest{
library(bayestestR)
# rstanarm models
# -----------------------------------------------
if (require("rstanarm")) {
model <- rstanarm::stan_glm(mpg ~ wt + cyl, data = mtcars)
describe_prior(model)
}
# brms models
# -----------------------------------------------
if (require("brms")) {
model <- brms::brm(mpg ~ wt + cyl, data = mtcars)
describe_prior(model)
}
# BayesFactor objects
# -----------------------------------------------
if (require("BayesFactor")) {
bf <- ttestBF(x = rnorm(100, 1, 1))
describe_prior(bf)
}
}
}