BetaDistribution {rdecision} | R Documentation |
A parametrized Beta Distribution
Description
An R6 class representing a Beta distribution with parameters.
Details
A Beta distribution with hyperparameters for shape (alpha
and beta
). Inherits from class Distribution
.
Super class
rdecision::Distribution
-> BetaDistribution
Methods
Public methods
Inherited methods
Method new()
Create an object of class BetaDistribution
.
Usage
BetaDistribution$new(alpha, beta)
Arguments
alpha
parameter of the Beta distribution.
beta
parameter of the Beta distribution.
Returns
An object of class BetaDistribution
.
Method distribution()
Accessor function for the name of the uncertainty distribution.
Usage
BetaDistribution$distribution()
Returns
Distribution name as character string.
Method mean()
The expected value of the distribution.
Usage
BetaDistribution$mean()
Returns
Expected value as a numeric value.
Method mode()
The mode of the distribution (if
alpha
, beta
> 1)
Usage
BetaDistribution$mode()
Returns
mode as a numeric value.
Method SD()
The standard deviation of the distribution.
Usage
BetaDistribution$SD()
Returns
Standard deviation as a numeric value
Method sample()
Draw and hold a random sample from the model variable.
Usage
BetaDistribution$sample(expected = FALSE)
Arguments
expected
If TRUE, sets the next value retrieved by a call to
r()
to be the mean of the distribution.
Returns
Updated distribution.
Method quantile()
The quantiles of the Beta distribution.
Usage
BetaDistribution$quantile(probs)
Arguments
probs
Vector of probabilities, in range [0,1].
Returns
Vector of quantiles.
Method clone()
The objects of this class are cloneable with this method.
Usage
BetaDistribution$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Author(s)
Andrew J. Sims andrew.sims@newcastle.ac.uk