Learn R Programming

quickpsy (version 0.1.5.1)

weibull_fun: Weibull function

Description

Weibull function of the form \( (1 - exp(-(x/\alpha)^\beta)\)

Usage

weibull_fun(x, p)

Arguments

x

Vector of values of the explanatory variable.

p

Vector of parameters \(p = c(\alpha, \beta)\).

Value

Probability at each x.

Examples

Run this code
# NOT RUN {
xseq <- seq(0, 4, .01)
yseq <- weibull_fun(xseq, c(2, 4))
curve <- data.frame(x = xseq, y = yseq)
ggplot(curve, aes(x = x, y = y)) + geom_line()
# }

Run the code above in your browser using DataLab