An R6 class representing a parametrized Normal distribution.
Andrew J. Sims andrew.sims@newcastle.ac.uk
rdecision::Distribution
-> NormalDistribution
new()
Create a parametrized normal distribution.
NormalDistribution$new(mu, sigma)
mu
Mean of the Normal distribution.
sigma
Standard deviation of the Normal distribution.
A NormalDistribution
object.
distribution()
Accessor function for the name of the distribution.
NormalDistribution$distribution()
Distribution name as character string.
sample()
Draw a random sample from the model variable.
NormalDistribution$sample(expected = FALSE)
expected
If TRUE, sets the next value retrieved by a call to
r()
to be the mean of the distribution.
A sample drawn at random.
Expected value as a numeric value.
SD()
Return the standard deviation of the distribution.
NormalDistribution$SD()
Standard deviation as a numeric value
quantile()
Return the quantiles of the Normal uncertainty distribution.
NormalDistribution$quantile(probs)
probs
Vector of probabilities, in range [0,1].
Vector of quantiles.
clone()
The objects of this class are cloneable with this method.
NormalDistribution$clone(deep = FALSE)
deep
Whether to make a deep clone.
A Normal distribution with hyperparameters mean (mu
) and
standard deviation (sd
). Inherits from class Distribution
.