as_prior: Constructor for bayprior from raw parameters

View source: R/methods.R

as_priorR Documentation

Constructor for bayprior from raw parameters

Description

Construct a bayprior object directly from known hyperparameters (e.g., literature-based priors), bypassing elicitation.

Usage

as_prior(dist, params, label = "Prior", expert_id = "Literature")

Arguments

dist

Character. One of "beta", "normal", "gamma".

params

Named list of hyperparameters.

label

Character. Description of the quantity.

expert_id

Character. Source identifier.

Value

A bayprior object.

Examples

# Historical Beta(2, 8) prior on response rate
prior <- as_prior("beta", list(alpha = 2, beta = 8),
                  label = "Historical response rate prior")


bayprior documentation built on Aug. 27, 2026, 1:09 a.m.