Density, distribution function, quantile function, and random generation
for a mixture of two lognormal distribution with parameters
mean1
, cv1
, mean2
, cv2
, and p.mix
.
dlnormMixAlt(x, mean1 = exp(1/2), cv1 = sqrt(exp(1) - 1),
mean2 = exp(1/2), cv2 = sqrt(exp(1) - 1), p.mix = 0.5)
plnormMixAlt(q, mean1 = exp(1/2), cv1 = sqrt(exp(1) - 1),
mean2 = exp(1/2), cv2 = sqrt(exp(1) - 1), p.mix = 0.5)
qlnormMixAlt(p, mean1 = exp(1/2), cv1 = sqrt(exp(1) - 1),
mean2 = exp(1/2), cv2 = sqrt(exp(1) - 1), p.mix = 0.5)
rlnormMixAlt(n, mean1 = exp(1/2), cv1 = sqrt(exp(1) - 1),
mean2 = exp(1/2), cv2 = sqrt(exp(1) - 1), p.mix = 0.5)
dlnormMixAlt
gives the density, plnormMixAlt
gives the distribution
function, qlnormMixAlt
gives the quantile function, and
rlnormMixAlt
generates random deviates.
vector of quantiles.
vector of quantiles.
vector of probabilities between 0 and 1.
sample size. If length(n)
is larger than 1, then length(n)
random values are returned.
vector of means of the first lognormal random variable. The default is
meanlog1=sqrt(exp(1) - 1)
.
vector of coefficient of variations of the first lognormal random variable.
The default is sdlog1=sqrt(exp(1) - 1)
.
vector of means of the second lognormal random variable. The default is
mean2=sqrt(exp(1) - 1)
.
vector of coefficient of variations of the second lognormal random variable.
The default is sdlog2=sqrt(exp(1) - 1)
.
vector of probabilities between 0 and 1 indicating the mixing proportion.
For rlnormMixAlt
this must be a single, non-missing number.
Steven P. Millard (EnvStats@ProbStatInfo.com)
Let mean=
cv=
mean1=
cv1=
mean2=
cv2=
p.mix=
The default values for mean1
and cv1
correspond to a
lognormal distribution with parameters
meanlog=0
and sdlog=1
. Similarly for the default values
of mean2
and cv2
.
Gilliom, R.J., and D.R. Helsel. (1986). Estimation of Distributional Parameters for Censored Trace Level Water Quality Data: 1. Estimation Techniques. Water Resources Research 22, 135-146.
Johnson, N. L., S. Kotz, and A.W. Kemp. (1992). Univariate Discrete Distributions. Second Edition. John Wiley and Sons, New York, pp.53-54, and Chapter 8.
Johnson, N. L., S. Kotz, and N. Balakrishnan. (1994). Continuous Univariate Distributions, Volume 1. Second Edition. John Wiley and Sons, New York.
LognormalAlt, LognormalMix, Lognormal, NormalMix, Probability Distributions and Random Numbers.
# Density of a lognormal mixture with parameters mean=2, cv1=3,
# mean2=4, cv2=5, p.mix=0.5, evaluated at 1.5:
dlnormMixAlt(1.5, mean1 = 2, cv1 = 3, mean2 = 4, cv2 = 5, p.mix = 0.5)
#[1] 0.1436045
#----------
# The cdf of a lognormal mixture with parameters mean=2, cv1=3,
# mean2=4, cv2=5, p.mix=0.5, evaluated at 1.5:
plnormMixAlt(1.5, mean1 = 2, cv1 = 3, mean2 = 4, cv2 = 5, p.mix = 0.5)
#[1] 0.6778064
#----------
# The median of a lognormal mixture with parameters mean=2, cv1=3,
# mean2=4, cv2=5, p.mix=0.5:
qlnormMixAlt(0.5, 2, 3, 4, 5, 0.5)
#[1] 0.6978355
#----------
# Random sample of 3 observations from a lognormal mixture with
# parameters mean1=2, cv1=3, mean2=4, cv2=5, p.mix=0.5.
# (Note: the call to set.seed simply allows you to reproduce this example.)
set.seed(20)
rlnormMixAlt(3, 2, 3, 4, 5, 0.5)
#[1] 0.70672151 14.43226313 0.05521329
Run the code above in your browser using DataLab