weibullmix {cylcop} | R Documentation |
Density, Distribution, Quantiles and Random Number Generation for the mixed Weibull distribution
Description
The number of components in the mixed Weibull distribution is specified by the length of the parameter vectors. The quantiles are numerically obtained from the distribution function using monotone cubic splines.
Usage
rweibullmix(n, shape, scale, prop)
dweibullmix(x, shape, scale, prop)
pweibullmix(q, shape, scale, prop)
qweibullmix(p, shape, scale, prop)
Arguments
n |
integer value, the number of random samples to be
generated with |
shape |
numeric vector holding the shape parameter of the components. |
scale |
numeric vector holding the scale parameter of the components. |
prop |
numeric vector, holding the mixing proportions of the components. |
x |
numeric vector giving the points where the density function is evaluated. |
q |
numeric vector giving the quantiles where the distribution function is evaluated. |
p |
numeric vector giving the probabilities where the quantile function is evaluated. |
Value
dweibullmix()
gives a vector of lengthlength(x)
containing the density atx
.pweibullmix()
gives a vector of lengthlength(q)
containing the distribution function at the corresponding values ofq
.qweibullmix()
gives a vector of lengthlength(p)
containing the quantiles at the corresponding values ofp
.rweibullmix()
generates a vector of lengthn
containing the random samples.
Examples
rweibullmix(10, shape = c(1, 3, 7), scale = c(2, 2, 4), prop = c(0.6, 0.3, 0.1))
dweibullmix(c(0, 2, 1), shape = c(1, 3), scale = c(2, 2), prop = c(0.6, 0.4))
prob <- pweibullmix(c(0.1, 7), shape = c(1, 3, 7), scale = c(2, 2, 4), prop = c(0.6, 0.3, 0.1))
prob
qweibullmix(prob, shape = c(1, 3, 7), scale = c(2, 2, 4), prop = c(0.6, 0.3, 0.1))