weibull_fun: Weibull function

Description Usage Arguments Value Examples

View source: R/weibull_fun.R

Description

Weibull function of the form (1 - exp(-(x/α)^β)

Usage

1

Arguments

x

Vector of values of the explanatory variable.

p

Vector of parameters p = c(α, β).

Value

Probability at each x.

Examples

1
2
3
4
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()

Example output

Loading required package: DEoptim
Loading required package: parallel

DEoptim package
Differential Evolution algorithm in R
Authors: D. Ardia, K. Mullen, B. Peterson and J. Ulrich

Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Loading required package: ggplot2

Attaching package: 'quickpsy'

The following object is masked from 'package:stats':

    deviance

quickpsy documentation built on Oct. 2, 2019, 5:03 p.m.