weibull3p | R Documentation |
Probability density function (PDF), cummulative density function (CDF), quantile function and random generation for the Three-Parameter Weibull (weibull3p) distribution.
dweibull3p(x, shape = 1, scale = 1, mu = 0, log = FALSE)
pweibull3p(q, shape = 1, scale = 1, mu = 0, lower.tail = TRUE, log.p = FALSE)
qweibull3p(p, shape = 1, scale = 1, mu = 0, lower.tail = TRUE, log.p = FALSE)
rweibull3p(n, shape = 1, scale = 1, mu = 0)
x, q |
numeric vector |
shape |
shape parameter, or slope, defaulting to 1 |
scale |
scale parameter, or characteristic life, defaulting to 1 |
mu |
location parameter (numerical, default 0). |
lower.tail |
logical; if TRUE (default), probabilities are P[X<=x], otherwise, P[X > x] |
log.p |
logical; if TRUE, probabilities/densities p are returned as log(p). |
n |
number of observations |
It is important to mention that Weibull distribution is defined for
x > 0
and, therefore, values x < 0
will yield probability
zero. While to obtain negative random values with function
rweibull3p is an indication that the location parameter
\mu
has not a valid value.
Three-parameter PDF values for dweibull3p, three-parameter probability for pweibull3p, quantiles or three-parameter random generated values for rweibull3p.
set.seed(123) # set a seed for random generation
## Sampling from the specified Weibull distribution
r <- rweibull3p(n = 1e5, shape = 1.4, scale = 3.7, mu = 0.9)
## The histogram and density
hist(r, 100, freq = FALSE, xlim = c(0, 20))
r1 <- seq(0, 20, by = 0.1)
lines(r1, dweibull3p(r1, shape = 1.4, scale = 3.7, mu = 0.9),
col = "red"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.