| bernlnorm | R Documentation |
Density, distribution function, quantile function and random
generation for the Bernoulli-Log-Normal distribution with parameters
prob, meanlog, and sdlog.
dbernlnorm(x, prob, meanlog, sdlog)
pbernlnorm(q, prob, meanlog, sdlog)
qbernlnorm(p, prob, meanlog, sdlog)
rbernlnorm(n, prob, meanlog, sdlog)
x, q |
vector of quantiles. |
p |
vector of probabilities. |
prob |
probability of non-zero event. |
n |
number of random samples. |
meanlog, sdlog |
meanlog and sdlog parameters of the Log-Normal distribution. |
Mixture of Bernoulli and Log-Normal distribution. The mixture is analogue
to the one described for the berngamma distribution.
dbernlnorm gives the density (pdf), pbernlnorm gives
the distribution function (cdf), qbernlnorm gives the
quantile function (inverse cdf), and rbernlnorm generates
random deviates.
The implementation is largely based on the blnorm family in
the CaDENCE-package (Cannon, 2012) that was only available as
test version at time of implementation (Mar. 2012).
Lukas Gudmundsson
Cannon, A. J. Neural networks for probabilistic environmental prediction: Conditional Density Estimation Network Creation and Evaluation (CaDENCE) in R. Computers & Geosciences, 2012, 41, 126 - 135, <doi:10.1016/j.cageo.2011.08.023>.
Lognormal, berngamma
data(obsprecip)
(ts <- startbernlnorm(obsprecip[,1]))
hist(obsprecip[,1],freq=FALSE)
lines(seq(0,20),dbernlnorm(0:20,
prob=ts$prob,
meanlog=ts$meanlog,
sdlog=ts$sdlog),
col="red")
pp <- seq(0.01,0.99,by=0.01)
qq <-quantile(obsprecip[,1],probs=pp)
plot(qq,pp)
lines(qbernlnorm(pp,
prob=ts$prob,
meanlog=ts$meanlog,
sdlog=ts$sdlog),
pp,col="red")
plot(qq,pp)
lines(qq,
pbernlnorm(qq,
prob=ts$prob,
meanlog=ts$meanlog,
sdlog=ts$sdlog),
col="red")
hist(rbernlnorm(1000,prob=ts$prob,
meanlog=ts$meanlog,
sdlog=ts$sdlog),freq=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.