R/boxCoxVariable.R

Defines functions boxCoxVariable

Documented in boxCoxVariable

#-------------------------------------------------------------------------------
# Revision history:
# 2009-09-29 by J. Fox (renamed)
#-------------------------------------------------------------------------------

# constructed variable for Box-Cox transformation (J. Fox)

boxCoxVariable <- function(y) {
	geo.mean <- exp(mean(log(y), na.rm=TRUE))
	y*(log(y/geo.mean) - 1)
}

Try the car package in your browser

Any scripts or data that you put into this service are public.

car documentation built on Nov. 6, 2021, 9:06 a.m.