Learn R Programming

RoBMA (version 4.0.0)

prior: Prior Distribution

Description

Create prior distribution objects used by RoBMA and brma fitting functions.

Usage

prior(
  distribution,
  parameters,
  truncation = list(lower = -Inf, upper = Inf),
  prior_weights = 1
)

Value

An object inheriting from prior.

Arguments

distribution

character. Prior distribution name.

parameters

list. Distribution parameters.

truncation

list with lower and upper truncation bounds.

prior_weights

numeric prior model weight.

Details

This is RoBMA's re-export of BayesTools::prior(); supported distribution names and parameter lists follow BayesTools.

Examples

Run this code
prior("normal", list(mean = 0, sd = 0.5))
prior(
  "normal",
  list(mean = 0, sd = 0.5),
  truncation = list(lower = 0, upper = Inf)
)

Run the code above in your browser using DataLab