Learn R Programming

distr (version 2.9.5)

Weibull-class: Class "Weibull"

Description

The Weibull distribution with shape parameter \(a\), by default \(=1\), and scale parameter \(\sigma\) has density given by, by default \(=1\), $$d(x) = (a/\sigma) {(x/\sigma)}^{a-1} \exp (-{(x/\sigma)}^{a})$$ for \(x > 0\).

C.f. rweibull

Arguments

Objects from the Class

Objects can be created by calls of the form Weibull(shape, scale). This object is a Weibull distribution.

Slots

img

Object of class "Reals": The space of the image of this distribution has got dimension 1 and the name "Real Space".

param

Object of class "WeibullParameter": the parameter of this distribution (shape and scale), declared at its instantiation

r

Object of class "function": generates random numbers (calls function rweibull)

d

Object of class "function": density function (calls function dweibull)

p

Object of class "function": cumulative function (calls function pweibull)

q

Object of class "function": inverse of the cumulative function (calls function qweibull)

.withArith

logical: used internally to issue warnings as to interpretation of arithmetics

.withSim

logical: used internally to issue warnings as to accuracy

.logExact

logical: used internally to flag the case where there are explicit formulae for the log version of density, cdf, and quantile function

.lowerExact

logical: used internally to flag the case where there are explicit formulae for the lower tail version of cdf and quantile function

Symmetry

object of class "DistributionSymmetry"; used internally to avoid unnecessary calculations.

Extends

Class "AbscontDistribution", directly.
Class "UnivariateDistribution", by class "AbscontDistribution".
Class "Distribution", by class "AbscontDistribution".

Methods

initialize

signature(.Object = "Weibull"): initialize method

scale

signature(object = "Weibull"): returns the slot scale of the parameter of the distribution

scale<-

signature(object = "Weibull"): modifies the slot scale of the parameter of the distribution

shape

signature(object = "Weibull"): returns the slot shape of the parameter of the distribution

shape<-

signature(object = "Weibull"): modifies the slot shape of the parameter of the distribution

*

signature(e1 = "Weibull", e2 = "numeric"): For the Weibull distribution we use its closedness under positive scaling transformations.

Author

Thomas Stabla statho3@web.de,
Florian Camphausen fcampi@gmx.de,
Peter Ruckdeschel peter.ruckdeschel@uni-oldenburg.de,
Matthias Kohl Matthias.Kohl@stamats.de

See Also

WeibullParameter-class AbscontDistribution-class Reals-class rweibull

Examples

Run this code
W <- Weibull(shape=1,scale=1) # W is a Weibull distribution with shape=1 and scale=1.
r(W)(1) # one random number generated from this distribution, e.g. 0.5204105
d(W)(1) # Density of this distribution is 0.3678794 for x=1.
p(W)(1) # Probability that x<1 is 0.6321206.
q(W)(.1) # Probability that x<0.1053605 is 0.1.
## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.)
shape(W) # shape of this distribution is 1.
shape(W) <- 2 # shape of this distribution is now 2.

Run the code above in your browser using DataLab