Learn R Programming

bayestestR (version 0.4.0)

describe_prior: Describe Priors

Description

Returns a summary of the priors used in the model.

Usage

describe_prior(model, ...)

Arguments

model

A Bayesian model.

...

Currently not used.

Examples

Run this code
# NOT RUN {
library(bayestestR)

# rstanarm models
# -----------------------------------------------
library(rstanarm)
model <- rstanarm::stan_glm(mpg ~ wt + cyl, data = mtcars)
describe_prior(model)

# brms models
# -----------------------------------------------
library(brms)
model <- brms::brm(mpg ~ wt + cyl, data = mtcars)
describe_prior(model)

# BayesFactor objects
# -----------------------------------------------
library(BayesFactor)
bf <- ttestBF(x = rnorm(100, 1, 1))
describe_prior(bf)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab