| bcreg {bcmixed} | R Documentation |
Linear regression model with the Box-Cox Transformation.
Description
bcreg returns the maximum likelihood estimates for parameters of
the linear regression models with the Box-Cox transformation (Box and Cox,
1964).
Usage
bcreg(formula, data, lmdint = c(-3, 3))
Arguments
formula |
a two-sided linear formula object describing the model, with the response on the left of a ~ operator and the terms, separated by + operators, on the right. |
data |
a data frame in which to interpret the variables named in the formula. |
lmdint |
a vector containing the end-points of the interval to be searched for a transformation parameter. Default is c(-3, 3). |
Value
bcreg returns a list including following components:
lambdaa numeric value with the estimate of the transformation parameter.
betaa vector with the estimates of the regression parameters.
sigmaa numeric value with the estimate of the scale parameter.
betainfa data frame with inference results for
betaunder the assumption thatlambdais known.lika numeric value with the maximized likelihood.
lmObjectan object of "
lm" containing the results oflmfunction on the transformed scale
References
Box, G.E.P. and Cox, D.R. (1964). An analysis of transformations (with discussion). Journals of the Royal Statistical Society, Series B, 26, 211-246, https://doi.org/10.1111/j.2517-6161.1964.tb00553.x.
See Also
Examples
data(aidscd4)
#Transformation of baseline observation for aid.cd4 data
bcreg(cd4.bl ~ 1, aidscd4[aidscd4$weekc == 8, ])