Hi, I can't seem to find a function in R that will reverse a BoxCox transformation. Can somebody help me locate one please? Thanks in advance. Best wishes, Des [[alternative HTML version deleted]]
to backtransform 'estimate':
if (lambda == 0 ) {
log(estimate)
} else {
estimate^(1/lambda)
}
"Des Callaghan"
<descall at blueyond
er.co.uk> To
Sent by: <r-help at stat.math.ethz.ch>
r-help-bounces at st cc
at.math.ethz.ch
Subject
[R] Inverse BoxCox transformation
18/06/2007 09:32
Hi,
I can't seem to find a function in R that will reverse a BoxCox
transformation. Can somebody help me locate one please? Thanks in advance.
Best wishes,
Des
[[alternative HTML version deleted]]
______________________________________________
R-help at 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
and provide commented, minimal, self-contained, reproducible code.
Look at the definition for the transform. For example in the "car" package, ?box.cox Then do the simple algebraic manipulations yourself. Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Des Callaghan Sent: Monday, June 18, 2007 3:33 AM To: r-help at stat.math.ethz.ch Subject: [R] Inverse BoxCox transformation Hi, I can't seem to find a function in R that will reverse a BoxCox transformation. Can somebody help me locate one please? Thanks in advance. Best wishes, Des [[alternative HTML version deleted]] ______________________________________________ R-help at 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 and provide commented, minimal, self-contained, reproducible code.
Dear Des,
The following should do the trick:
invBoxCox <- function(x, lambda)
if (lambda == 0) exp(x) else (lambda*x + 1)^(1/lambda)
I hope this helps,
John
--------------------------------
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.ca/jfox
--------------------------------
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Des Callaghan
> Sent: Monday, June 18, 2007 3:33 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] Inverse BoxCox transformation
>
> Hi,
>
> I can't seem to find a function in R that will reverse a
> BoxCox transformation. Can somebody help me locate one
> please? Thanks in advance.
>
> Best wishes,
> Des
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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
> and provide commented, minimal, self-contained, reproducible code.
>