simulate_prior: Returns Priors of a Model as Empirical Distributions

View source: R/simulate_priors.R

simulate_priorR Documentation

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, brmsfit, blavaan, or MCMCglmm object.

n

Size of the simulated prior distributions.

...

Currently not used.

See Also

unupdate() for directly sampling from the prior distribution (useful for complex priors and designs).

Examples


library(bayestestR)
if (require("rstanarm")) {
  model <- suppressWarnings(
    stan_glm(mpg ~ wt + am, data = mtcars, chains = 1, refresh = 0)
  )
  simulate_prior(model)
}


easystats/bayestestR documentation built on July 18, 2024, 6:34 a.m.