simulate_prior: Returns Priors of a Model as Empirical Distributions

Description Usage Arguments See Also Examples

View source: R/simulate_priors.R

Description

Transforms priors information to actual distributions.

Usage

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

Arguments

model

A stanreg, stanfit, or brmsfit 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

1
2
3
4
5
6
7
8
## Not run: 
library(bayestestR)
if (require("rstanarm")) {
  model <- stan_glm(mpg ~ wt + am, data = mtcars, chains = 1, refresh = 0)
  simulate_prior(model)
}

## End(Not run)

DominiqueMakowski/bayestestR documentation built on July 27, 2021, 4:12 p.m.