Learn R Programming

qbrms (version 1.0.1)

prior_predictive_check: Create Prior Predictive Distribution Plot

Description

Generate predictions from the prior distribution to assess whether priors are reasonable before seeing the data.

Usage

prior_predictive_check(formula, data, family, prior, n_samples = 1000)

Value

A ggplot object showing the prior predictive distribution

Arguments

formula

Model formula

data

Data frame (used for structure, not values)

family

Model family

prior

Prior specification

n_samples

Number of prior predictive samples (default: 1000)

Examples

Run this code
if (FALSE) {
prior_predictive_check(
  mpg ~ hp + wt,
  data = mtcars,
  family = gaussian(),
  prior = prior(normal(0, 10), class = "b")
)
}

Run the code above in your browser using DataLab