An R6 class representing a log Normal distribution.
Andrew J. Sims andrew.sims@newcastle.ac.uk
rdecision::Distribution
-> LogNormDistribution
new()
Create a log normal distribution.
LogNormDistribution$new(p1, p2, parametrization = "LN1")
p1
First hyperparameter, a measure of location. See Details.
p2
Second hyperparameter, a measure of spread. See Details.
parametrization
A character string taking one of the values
"LN1"
(default) through "LN7"
(see Details).
A LogNormDistribution
object.
distribution()
Accessor function for the name of the distribution.
LogNormDistribution$distribution()
Distribution name as character string ("LN1"
, "LN2"
etc.).
sample()
Draw a random sample from the model variable.
LogNormDistribution$sample(expected = FALSE)
expected
If TRUE, sets the next value retrieved by a call to
r()
to be the mean of the distribution.
Updated LogNormDistribution
object.
Expected value as a numeric value.
Point estimate (mode) of the log normal distribution.
SD()
Return the standard deviation of the distribution.
LogNormDistribution$SD()
Standard deviation as a numeric value
quantile()
Return the quantiles of the log normal distribution.
LogNormDistribution$quantile(probs)
probs
Vector of probabilities, in range [0,1].
Vector of quantiles.
clone()
The objects of this class are cloneable with this method.
LogNormDistribution$clone(deep = FALSE)
deep
Whether to make a deep clone.
A parametrized Log Normal distribution inheriting from class
Distribution
. Swat (2017) defined seven parametrizations of the log
normal distribution.
These are linked, allowing the parameters of any one to be derived from any
other. All 7 parametrizations require two parameters as follows:
\(p_1=\mu\), \(p_2=\sigma\), where \(\mu\) and \(\sigma\) are the mean and standard deviation, both on the log scale.
\(p_1=\mu\), \(p_2=v\), where \(\mu\) and \(v\) are the mean and variance, both on the log scale.
\(p_1=m\), \(p_2=\sigma\), where \(m\) is the median on the natural scale and \(\sigma\) is the standard deviation on the log scale.
\(p_1=m\), \(p_2=c_v\), where \(m\) is the median on the natural scale and \(c_v\) is the coefficient of variation on the natural scale.
\(p_1=\mu\), \(p_2=\tau\), where \(\mu\) is the mean on the log scale and \(\tau\) is the precision on the log scale.
\(p_1=m\), \(p_2=\sigma_g\), where \(m\) is the median on the natural scale and \(\sigma_g\) is the geometric standard deviation on the natural scale.
\(p_1=\mu_N\), \(p_2=\sigma_N\), where \(\mu_N\) is the mean on the natural scale and \(\sigma_N\) is the standard deviation on the natural scale.
Briggs A, Claxton K and Sculpher M. Decision Modelling for Health Economic Evaluation. Oxford 2006, ISBN 978-0-19-852662-9. Leaper DJ, Edmiston CE and Holy CE. Meta-analysis of the potential economic impact following introduction of absorbable antimicrobial sutures. British Journal of Surgery 2017;104:e134-e144. Swat MJ, Grenon P and Wimalaratne S. Ontology and Knowledge Base of Probability Distributions. EMBL-EBI Technical Report (ProbOnto 2.5), 13 January 2017, https://sites.google.com/site/probonto/download.