Learn R Programming

rmutil (version 1.1.9)

Box-Cox: Box-Cox Distribution

Description

These functions provide information about the Box-Cox distribution with location parameter equal to m, dispersion equal to s, and power transformation equal to f: density, cumulative distribution, quantiles, log hazard, and random generation.

The Box-Cox distribution has density $$ f(y) = \frac{1}{\sqrt{2 \pi \sigma^2}} \exp(-((y^\nu/\nu-\mu)^2/(2 \sigma^2)))/ (1-I(\nu<0)-sign(\nu)*pnorm(0,\mu,sqrt(\sigma)))$$ where \(\mu\) is the location parameter of the distribution, \(\sigma\) is the dispersion, \(\nu\) is the family parameter, \(I()\) is the indicator function, and \(y>0\).

\(\nu=1\) gives a truncated normal distribution.

Usage

dboxcox(y, m, s=1, f=1, log=FALSE)
pboxcox(q, m, s=1, f=1)
qboxcox(p, m, s=1, f=1)
rboxcox(n, m, s=1, f=1)

Arguments

y

vector of responses.

q

vector of quantiles.

p

vector of probabilities

n

number of values to generate

m

vector of location parameters.

s

vector of dispersion parameters.

f

vector of power parameters.

log

if TRUE, log probabilities are supplied.

Author

J.K. Lindsey

See Also

dnorm for the normal or Gaussian distribution.

Examples

Run this code
dboxcox(2, 5, 5, 2)
pboxcox(2, 5, 5, 2)
qboxcox(0.1, 5, 5, 2)
rboxcox(10, 5, 5, 2)

Run the code above in your browser using DataLab