Learn R Programming

adoptr (version 0.2.2)

ContinuousPrior-class: Continuous univariate prior distributions

Description

ContinuousPrior is a sub-class of Prior implementing a generic representation of continuous prior distributions over a compact interval on the real line.

Usage

ContinuousPrior(pdf, support, tighten_support = FALSE,
  check_normalization = TRUE)

# S4 method for ContinuousPrior show(object)

Arguments

pdf

vectorized univariate PDF function

support

numeric vector of length two with the bounds of the compact interval on which the pdf is positive.

tighten_support

logical indicating if the support should be tightened

check_normalization

logical indicating if it should be checked that pdf defines a density.

object

object of class ContinuousPrior

Slots

pdf

cf. parameter 'pdf'

support

cf. parameter 'support'

See Also

Discrete priors are supported via PointMassPrior

Examples

Run this code
# NOT RUN {
ContinuousPrior(function(x) 2*x, c(0, 1))

# }

Run the code above in your browser using DataLab