| bcreg | R Documentation |
bcreg returns the maximum likelihood estimates for parameters of
the linear regression models with the Box-Cox transformation (Box and Cox,
1964).
bcreg(formula, data, lmdint = c(-3, 3))
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). |
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 beta
under the assumption that lambda is known.
lika numeric value with the maximized likelihood.
lmObjectan object of "lm" containing the results of
lm function on the transformed scale
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, \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/j.2517-6161.1964.tb00553.x")}.
lm
data(aidscd4)
#Transformation of baseline observation for aid.cd4 data
bcreg(cd4.bl ~ 1, aidscd4[aidscd4$weekc == 8, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.