NormalDistribution {rdecision}R Documentation

A parametrized Normal distribution

Description

An R6 class representing a parametrized Normal distribution.

Details

A Normal distribution with hyperparameters mean (mu) and standard deviation (sd). Inherits from class Distribution.

Super class

rdecision::Distribution -> NormalDistribution

Methods

Public methods

Inherited methods

Method new()

Create a parametrized normal distribution.

Usage
NormalDistribution$new(mu, sigma)
Arguments
mu

Mean of the Normal distribution.

sigma

Standard deviation of the Normal distribution.

Returns

A NormalDistribution object.


Method distribution()

Accessor function for the name of the distribution.

Usage
NormalDistribution$distribution()
Returns

Distribution name as character string.


Method sample()

Draw a random sample from the model variable.

Usage
NormalDistribution$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

A sample drawn at random.


Method mean()

Return the mean value of the distribution.

Usage
NormalDistribution$mean()
Returns

Expected value as a numeric value.


Method SD()

Return the standard deviation of the distribution.

Usage
NormalDistribution$SD()
Returns

Standard deviation as a numeric value


Method quantile()

Return the quantiles of the Normal uncertainty distribution.

Usage
NormalDistribution$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
NormalDistribution$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

Author(s)

Andrew J. Sims andrew.sims@newcastle.ac.uk


[Package rdecision version 1.2.0 Index]