4

I have writen code for a Box-Cox transformation (see below). But now I want to do a Yeo-Johnson transformation because datc$plot contains zeros. I tried, but I didn't find a solution.

lambda.fm1 <- boxcox(datc$plot ~ datc$cond.evlot*datc$cond.dl*datc$version), 
                     family="yjPower")
lambda.max <- lambda.fm1$x[which.max(lambda.fm1$y)]
require(car)
datc$plott <- bcPower(datc$plot, lambda = lambda.max, jacobian.adjusted = FALSE)
Glen_b
  • 282,281

1 Answers1

5

From a recent update (2013, August 04th), caret R package (see page 97) also supports Y-J power transformation.

Andre Silva
  • 3,080
Leo5188
  • 151
  • I'm looking for the inverse of Yeo-Johnson Transformation in R. Could you please give a link on a package/function. – Nick Mar 26 '17 at 02:24