| LogNormDistribution {rdecision} | R Documentation |
A parametrized log Normal probability distribution
Description
An R6 class representing a log Normal distribution.
Details
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:
- LN1
p_1=\mu,p_2=\sigma, where\muand\sigmaare the mean and standard deviation, both on the log scale.- LN2
p_1=\mu,p_2=v, where\muandvare the mean and variance, both on the log scale.- LN3
p_1=m,p_2=\sigma, wheremis the median on the natural scale and\sigmais the standard deviation on the log scale.- LN4
p_1=m,p_2=c_v, wheremis the median on the natural scale andc_vis the coefficient of variation on the natural scale.- LN5
p_1=\mu,p_2=\tau, where\muis the mean on the log scale and\tauis the precision on the log scale.- LN6
p_1=m,p_2=\sigma_g, wheremis the median on the natural scale and\sigma_gis the geometric standard deviation on the natural scale.- LN7
p_1=\mu_N,p_2=\sigma_N, where\mu_Nis the mean on the natural scale and\sigma_Nis the standard deviation on the natural scale.
Super class
rdecision::Distribution -> LogNormDistribution
Methods
Public methods
Inherited methods
Method new()
Create a log normal distribution.
Usage
LogNormDistribution$new(p1, p2, parametrization = "LN1")
Arguments
p1First hyperparameter, a measure of location. See Details.
p2Second hyperparameter, a measure of spread. See Details.
parametrizationA character string taking one of the values
"LN1"(default) through"LN7"(see Details).
Returns
A LogNormDistribution object.
Method distribution()
Accessor function for the name of the distribution.
Usage
LogNormDistribution$distribution()
Returns
Distribution name as character string ("LN1", "LN2"
etc.).
Method sample()
Draw a random sample from the model variable.
Usage
LogNormDistribution$sample(expected = FALSE)
Arguments
expectedIf TRUE, sets the next value retrieved by a call to
r()to be the mean of the distribution.
Returns
Updated LogNormDistribution object.
Method mean()
Return the expected value of the distribution.
Usage
LogNormDistribution$mean()
Returns
Expected value as a numeric value.
Method mode()
Return the point estimate of the variable.
Usage
LogNormDistribution$mode()
Returns
Point estimate (mode) of the log normal distribution.
Method SD()
Return the standard deviation of the distribution.
Usage
LogNormDistribution$SD()
Returns
Standard deviation as a numeric value
Method quantile()
Return the quantiles of the log normal distribution.
Usage
LogNormDistribution$quantile(probs)
Arguments
probsVector of probabilities, in range [0,1].
Returns
Vector of quantiles.
Method clone()
The objects of this class are cloneable with this method.
Usage
LogNormDistribution$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Note
The log normal distribution may be used to model the uncertainty in
an estimate of relative risk (Briggs 2006, p90). If a relative risk
estimate is available with a 95% confidence interval, the "LN7"
parametrization
allows the uncertainty distribution to be specified directly. For example,
if RR = 0.67 with 95% confidence interval 0.53 to 0.84 (Leaper, 2016), it
can be modelled with
LogNormModVar$new("rr", "RR", p1=0.67,
p2=(0.84-0.53)/(2*1.96)), "LN7").
Author(s)
Andrew J. Sims andrew.sims@newcastle.ac.uk
References
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. Bioinformatics 2016;32:2719-2721, doi:10.1093/bioinformatics/btw170.