Learn R Programming

bayestestR (version 0.4.0)

simulate_prior: Returns Priors of a Model as Empirical Distributions

Description

Transforms priors information to actual distributions.

Usage

simulate_prior(model, n = 1000, ...)

Arguments

model

A stanreg, stanfit, or brmsfit object.

n

Size of the simulated prior distributions.

...

Currently not used.

Examples

Run this code
# NOT RUN {
library(bayestestR)
library(rstanarm)

model <- stan_glm(mpg ~ wt + am, data = mtcars, chains = 1, refresh = 0)
simulate_prior(model)
# }

Run the code above in your browser using DataLab