Description Usage Arguments Details Value Author(s) References See Also Examples
Functions related with the Box-Cox family of transformations.
Density and random generation for the Box-Cox transformed normal
distribution with mean
equal to mean
and standard deviation equal to sd
, in the normal scale.
1 2 3 |
lambda |
numerical value(s) for the transformation parameter lambda. |
lambda2 |
logical or numerical value(s) of the additional transformation
(see DETAILS below). Defaults to |
n |
number of observations to be generated. |
x |
a vector of quantiles ( |
mean |
a vector of mean values at the normal scale. |
sd |
a vector of standard deviations at the normal scale. |
Denote Y the variable at the original scale and Y' the transformed variable. The Box-Cox transformation is defined by:
Y' = log(Y) if lambda = 0 , Y' = ((Y ^ lambda) - 1)/lambda otherwise
.
An additional shifting parameter lambda2 can be included in which case the transformation is given by:
Y' = log(Y + lambda2) if lambda = 0 , Y' = (((Y + lambda2) ^ lambda) - 1)/lambda otherwise
.
The function rboxcox
samples Y' from the normal distribution using
the function rnorm
and backtransform the values according to the
equations above to obtain values of Y.
If necessary the back-transformation truncates the values such that
Y' >= -1/lambda results in
Y = 0 in the original scale.
Increasing the value of the mean and/or reducing the variance might help to avoid truncation.
The functions returns the following results:
rboxcox |
a vector of random deviates. |
dboxcox |
a vector of densities. |
Paulo Justiniano Ribeiro Jr. paulojus@leg.ufpr.br,
Peter J. Diggle p.diggle@lancaster.ac.uk.
Box, G.E.P. and Cox, D.R.(1964) An analysis of transformations. JRSS B 26:211–246.
The parameter estimation function boxcoxfit
,
the function boxcox
in the package MASS and
the function box.cox
in the package car.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.