discrete-uniform-prior | R Documentation |
Prior distributions over a discrete quantities.
PointMassPrior(location)
PoissonPrior(mean, lower.limit = 0, upper.limit = Inf)
DiscreteUniformPrior(lower.limit, upper.limit)
location |
The location of the point mass. |
mean |
The mean of the Poisson distribution. |
lower.limit |
The smallest value within the support of the
distribution. The prior probability for numbers less than
|
upper.limit |
The largest value within the support of the
distribution. The prior probability for numbers greater than
|
Each function returns a prior object whose class is the same as the function name. All of these inherit from "DiscreteUniformPrior" and from "Prior".
The PoissonPrior
assumes a potentially truncated Poisson
distribution with the given mean.
Steven L. Scott steve.the.bayesian@gmail.com
## Specify an exact number of trees in a Bart model (see the BoomBart
## package).
ntrees <- PointMassPrior(200)
## Uniform prior between 50 and 100 trees, including the endpoints.
ntrees <- DiscreteUniformPrior(50, 100)
## Truncated Poisson prior, with a mean of 20, a lower endpoint of 1,
## and an upper endpoint of 50.
ntrees <- PoissonPrior(20, 1, 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.