Density, cumulative distribution, quantile functions and random number generation for the distribution that becomes normal after the Box-Cox transformation. Note that this is based on the original Box-Cox paper.
dbcnorm(q, mu =0, sigma =1, lambda =0, log =FALSE)pbcnorm(q, mu =0, sigma =1, lambda =0)qbcnorm(p, mu =0, sigma =1, lambda =0)rbcnorm(n =1, mu =0, sigma =1, lambda =0)
Arguments
q: vector of quantiles.
mu: vector of location parameters (means).
sigma: vector of scale parameters.
lambda: the value of the Box-Cox transform parameter.
log: if TRUE, then probabilities are returned in logarithms.
p: vector of probabilities.
n: number of observations. Should be a single number.
Returns
Depending on the function, various things are returned (usually either vector or scalar):
dbcnorm returns the density function value for the provided parameters.
pbcnorm returns the value of the cumulative function for the provided parameters.
qbcnorm returns quantiles of the distribution. Depending on what was provided in p, mu and sigma, this can be either a vector or a matrix, or an array.
rbcnorm returns a vector of random variables generated from the bcnorm distribution. Depending on what was provided in mu and sigma, this can be either a vector or a matrix or an array.
Details
The distribution has the following density function:
Both pbcnorm and qbcnorm are returned for the lower tail of the distribution.
In case of lambda=0, the values of the log normal distribution are returned. In case of lambda=1, the values of the normal distribution are returned with mu=mu+1.
All the functions are defined for non-negative values only.
Box, G. E., & Cox, D. R. (1964). An Analysis of Transformations. Journal of the Royal Statistical Society. Series B (Methodological), 26(2), 211–252. Retrieved from https://www.jstor.org/stable/2984418