stukel: The Stukel distribution

Description Usage Arguments Details Value References Examples

Description

Density, distribution function, quantile function and random generation function for the Prenctice distribution.

Usage

1
2
3
4
 dstukel(x, alpha)
 pstukel(q, alpha)
 qstukel(p, alpha)
 rstukel(n, alpha)

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

alpha

vector of size two with shape parameters.

Details

The Stukel distribution with parameter m has distribution function given by

F(x) = 1/(1 + exp(-h(x,alpha)))

for alpha[1] > 0 and alpha[2] > 0, h(x,alpha) is

h(x,alpha) = (exp(alpha[1]*x) - 1)/alpha[1] if (x >= 0) and (alpha[1] > 0) x if (x >= 0) and (alpha[1] = 0) -log(1 - alpha[1]*x)/alpha[1] if (x >= 0) and (alpha[1] < 0) -(exp(-alpha[2]*x) - 1)/alpha[2] if (x < 0) and (alpha[2] > 0) x if (x < 0) and (alpha[2] = 0) log(1 + alpha[2]*eta)/alpha[2] if (x < 0) and (alpha[2] < 0)

Value

'dstukel' gives the density, 'pstukel' gives the distribution function, 'qstukel' gives the quantile function, and 'rstukel' generates random deviates.

References

Stukel, T. A. (1988) Generalized logistic models. Journal of the American Statistical Association, pp. 426-431.

Examples

1
2
3
4
5
  set.seed(1234)
  alpha <- c(2,0.5)
  x <- seq(-5,5,0.01)
  y <- pstukel(x,alpha)
  plot(x,y,type="l",xlab="x",ylab="pstukel")

dnzmarcio/binreg documentation built on May 15, 2019, 9:41 a.m.