| weibull6 {cardidates} | R Documentation |
Six-Parametric Weibull Function
Description
Six-parametric Weibull function and its definite integral.
Usage
fweibull6(x, p)
aweibull6(p, lower = 0, upper = 365)
Arguments
x |
vector of function arguments |
p |
vector of function parameters with:
|
lower |
lower limit of the cumulative (integrated) function, |
upper |
upper limit of the cumulative (integrated) function. |
Details
The six-parametric Weibull function is more flexible than the four-parametric version. It is possible to have different offsets before and after the peak. The function can be given by:
f(x) = p_4 + \exp(-(x/p_5)^{p_6})) (1-p_1 * \exp(-(x/p_2)^{p_3}))
for x \ge 0.
Value
fweibull6 gives the function and aweibull6 its definite
integral (cumulative function or area under curve). Note that
in contrast to aweibull4, the integral is
solved numerically and that the function returns a scalar, not a vector.
See Also
weibull4,
fitweibull,
CDW,
peakwindow,
cardidates
Vectorize
Examples
x <- seq(0, 150)
plot(x, fweibull6(x, c(0.833, 40, 5, 0.2, 80, 5)), type = "l", ylim = c(0,2))
## interpretation of offsets
ofs1 <- 0.1
ofs2 <- 0.3
p1 <- 1-ofs1/(ofs2 + 1)
lines(x, fweibull6(x, c(p1, 20, 5, ofs2, 60, 5)), col = "red")
## definite integratel from zero to 150, returns scalar
aweibull6(c(p1, 20, 5, ofs2, 60, 5), lower = 0, upper = 150)
## use Vectorize to create vectorized functions
vec.aweibull6 <- Vectorize(aweibull6, "upper")
plot(x, vec.aweibull6(c(p1, 20, 5, ofs2, 60, 5), lower = 0, upper = x))