sample_priors {bayesnec}R Documentation

sample_priors

Description

Creates list or generates a plot of prior samples

Usage

sample_priors(priors, n_samples = 10000, plot = "ggplot")

Arguments

priors

An object of class brmsprior from package brms.

n_samples

The number of prior samples to return.

plot

NA returns a list of numeric vectors of sampled priors, "ggplot" (default) returns a ggplot and "base" returns a histogram in base R.

Value

A list containing the initialisation values.

See Also

bnec

Examples

library(bayesnec)
data(manec_example)
exmp <- pull_brmsfit(manec_example, model = "nec4param")
sample_priors(exmp$prior)


[Package bayesnec version 2.1.2.0 Index]