Skip to content
Prev 86089 / 398528 Next

about Cox-Box transformation

Hi

1. 	upgrade
2.	read Introduction to R shipped with the distribution
3.	read documentation to MASS
4.	packages not libraries
5.	use library(MASS) to make functions from MASS package available
6. 	now you can use boxcox() but not on vectors AFAIK

probably not completely correct but this

box.cox <- function(x, lambda,inv=F)
{	if (!inv)
		{if(missing(lambda))
			log(x)
		else (x^lambda - 1)/lambda}
	else (lambda*x+1)^(1/lambda)
}

you can use to perform Box-Cox transformation on vectors.

HTH
Petr
On 9 Feb 2006 at 11:51, Stefano Sofia wrote:
From:           	Stefano Sofia <stefano.sofia at regione.marche.it>
To:             	r-help at stat.math.ethz.ch
Date sent:      	Thu, 09 Feb 2006 11:51:02 +0000
Subject:        	[R] about Cox-Box transformation
Petr Pikal
petr.pikal at precheza.cz