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)
}
jonathon-love/car documentation built on May 19, 2019, 7:28 p.m.