| bernweibull | R Documentation |
Density, distribution function, quantile function and random
generation for the Bernoulli-Weibull distribution with parameters
prob, shape, and scale.
dbernweibull(x, prob, scale, shape)
pbernweibull(q, prob, scale, shape)
qbernweibull(p, prob, scale, shape)
rbernweibull(n, prob, scale, shape)
x, q |
vector of quantiles. |
p |
vector of probabilities. |
prob |
probability of non-zero event. |
n |
number of random samples. |
scale, shape |
shape and scale parameters of the weibull distribution. |
Mixture of Bernoulli and Weibull distribution. The mixture is analogue
to the one described for the berngamma distribution.
dbernweibull gives the density (pdf), pbernweibull gives
the distribution function (cdf), qbernweibull gives the
quantile function (inverse cdf), and rbernweibull generates
random deviates.
The implementation is largely based on the bweibull 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>.
Weibull, berngamma
data(obsprecip)
(ts <- startbernweibull(obsprecip[,1]))
hist(obsprecip[,1],freq=FALSE)
lines(seq(0,max(obsprecip[,1])),
dbernweibull(seq(0,max(obsprecip[,1])),
prob=ts$prob,
shape=ts$shape,
scale=ts$scale),
col="red")
pp <- seq(0.01,0.99,by=0.01)
qq <-quantile(obsprecip[,1],probs=pp)
plot(qq,pp)
lines(qbernweibull(pp,
prob=ts$prob,
scale=ts$scale,
shape=ts$shape),
pp,col="red")
plot(qq,pp)
lines(qq,
pbernweibull(qq,
prob=ts$prob,
scale=ts$scale,
shape=ts$shape),
col="red")
hist(rbernweibull(1000,prob=ts$prob,
shape=ts$shape,
scale=ts$scale),freq=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.