Re: [R] about Cox-Box transformation

From: Petr Pikal <petr.pikal_at_precheza.cz>
Date: Thu 09 Feb 2006 - 23:18:05 EST


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@regione.marche.it>
To:             	r-help@stat.math.ethz.ch
Date sent:      	Thu, 09 Feb 2006 11:51:02 +0000
Subject:        	[R] about Cox-Box transformation

> Dear R-users,
> I am using R version 1.8.0-1 under Suse 8.2.
> I need to use the boxcox command because I want to apply a Cox-Box
> transformation to a vector of rainfall values. Within the libraries,
> the MASS library is present, but I don't know whether this means that
> is automatically installed or not. The command doesn't work. What do I
> have to do in order to make it working? Is just a problem of
> installation or simply of recalling the right command?
>
> thank you for your help
> Stefano
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
petr.pikal@precheza.cz



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Thu Feb 09 23:28:20 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:26 EST