prentice: The Prentice 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
 dprentice(x, m)
 pprentice(q, m)
 qprentice(p, m)
 rprentice(n, m)

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

m

vector of size two with shape parameters.

Details

The Prentice distribution with parameter m has density given by

f(x) = exp(x*m[1])*((1+exp(x))^(-(m[1]+m[2])))/B(m[1],m[2])

for m[1] > 0 and m[2] > 0, where B(a,b) is the Beta function.

Value

'dprentice' gives the density, 'pprentice' gives the distribution function, 'qprentice' gives the quantile function, and 'rprentice' generates random deviates.

References

Prentice, R. L. (1975) Discrimination among some parametric models. Biometrika, 62(3):607-614.

Examples

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

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