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:

lambda

a numeric value with the estimate of the transformation parameter.

beta

a vector with the estimates of the regression parameters.

sigma

a numeric value with the estimate of the scale parameter.

betainf

a data frame with inference results for beta under the assumption that lambda is known.

lik

a numeric value with the maximized likelihood.

lmObject

an object of "lm" containing the results of lm function 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

lm

Examples

  data(aidscd4)
  #Transformation of baseline observation for aid.cd4 data
  bcreg(cd4.bl ~ 1, aidscd4[aidscd4$weekc == 8, ])


[Package bcmixed version 0.1.4 Index]