DelayedWeibull: Delayed Weibull Distribution

DelayedWeibullR Documentation

Delayed Weibull Distribution

Description

Density, distribution function, quantile function and random generation for the delayed Weibull distribution. Besides the additional parameter delay, the other two Weibull-parameters are in principle retained as in R's stats-package:

  • shape

  • scale (as inverse of rate)

Usage

dweib_delayed(
  x,
  delay1,
  shape1,
  scale1 = 1,
  delay2 = NULL,
  shape2 = NULL,
  scale2 = 1,
  delay = delay1,
  shape = shape1,
  scale = scale1,
  log = FALSE
)

pweib_delayed(
  q,
  delay1,
  shape1,
  scale1 = 1,
  delay2 = NULL,
  shape2 = NULL,
  scale2 = 1,
  delay = delay1,
  shape = shape1,
  scale = scale1,
  lower.tail = TRUE,
  log.p = FALSE
)

qweib_delayed(
  p,
  delay1,
  shape1,
  scale1 = 1,
  delay2 = NULL,
  shape2 = NULL,
  scale2 = 1,
  delay = delay1,
  shape = shape1,
  scale = scale1,
  lower.tail = TRUE,
  log.p = FALSE
)

rweib_delayed(
  n,
  delay1,
  shape1,
  scale1 = 1,
  delay2 = NULL,
  shape2 = NULL,
  scale2 = 1,
  delay = delay1,
  shape = shape1,
  scale = scale1
)

mweib_delayed(
  t = +Inf,
  delay1,
  shape1,
  scale1 = 1,
  delay2 = NULL,
  shape2 = NULL,
  scale2 = 1,
  delay = delay1,
  shape = shape1,
  scale = scale1
)

Arguments

x

A numeric vector of values for which to get the density.

delay1

numeric. The first delay, must be non-negative.

shape1

numeric. First shape parameter, must be positive.

scale1

numeric. First scale parameter (inverse of rate), must be positive.

delay2

numeric. The second delay, must be non-negative.

shape2

numeric. The second shape parameter, must be non-negative.

scale2

numeric. The second scale parameter (inverse of rate), must be positive.

delay

numeric. Alias for first delay.

shape

numeric. Alias for first shape.

scale

numeric. Alias for first scale.

log

logical. Return value on log-scale?

q

A numeric vector of quantile values.

lower.tail

logical. Give cumulative probability of lower tail?

log.p

logical. P-value on log-sclae?

p

A numeric vector of probabilities.

n

integer. Number of random observations requested.

t

A numeric vector of times that restrict the mean survival. Default is +Inf, i.e., the unrestricted mean survival time.

Details

Additional arguments are forwarded via ... to the underlying functions of the exponential distribution in the stats-package.

The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.

Value

Functions pertaining to the delayed Weibull distribution:

  • dweib_delayed gives the density

  • pweib_delayed gives the distribution function

  • qweib_delayed gives the quantile function

  • rweib_delayed generates a pseudo-random sample

  • mweib_delayed gives the restricted mean survival time

The length of the result is determined by n for rweib_delayed, and is the maximum of the lengths of the numerical arguments for the other functions, R's recycling rules apply.


incubate documentation built on Sept. 11, 2024, 6:50 p.m.