elicit_normal: Elicit a Normal prior via quantile matching or moment...

View source: R/elicitation.R

elicit_normalR Documentation

Elicit a Normal prior via quantile matching or moment matching

Description

Elicit a Normal prior via quantile matching or moment matching

Usage

elicit_normal(
  quantiles = NULL,
  mean = NULL,
  sd = NULL,
  method = c("quantile", "moments"),
  expert_id = "Expert_1",
  label = "Unknown quantity",
  tol = 1e-06
)

Arguments

quantiles

Named numeric vector. E.g. c("0.025" = -0.5, "0.50" = 0.2, "0.975" = 0.9).

mean

Optional numeric. Expert mean for moment matching.

sd

Optional numeric. Expert SD for moment matching.

method

Character. "quantile" or "moments".

expert_id

Character. Expert identifier.

label

Character. Quantity description.

tol

Numeric. Optimisation tolerance.

Details

For method = "moments", the Normal is parameterised directly by its mean and SD, so matching is exact with no transformation required: \mu = \bar{x}, \sigma = s.

Value

An object of class bayprior.

Examples

prior <- elicit_normal(
  quantiles = c("0.025" = -0.5, "0.50" = 0.2, "0.975" = 0.9),
  label     = "Log odds ratio"
)


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