Henry Thorogood
2009-Nov-30 16:02 UTC
[R] Scaling variables to positive values using scale() or performing BoxCox on negative data
Hi, I'm doing some work with linear models, and I've scaled my data using the scale(dataset) function. This was great at removing the skew, but I now can't perform the Box Cox transformation on the data set (using the boxcox(dataset) function), as the scaling has returned negative values. So my question is: how can I get the scale function to return a positive set of data (so I can use Box-Cox), or how can I get the boxcox function to handle negative values. Many thanks in advance, Henry [[alternative HTML version deleted]]
David Winsemius
2009-Nov-30 16:34 UTC
[R] Scaling variables to positive values using scale() or performing BoxCox on negative data
On Nov 30, 2009, at 11:02 AM, Henry Thorogood wrote:> Hi, > > I'm doing some work with linear models, and I've scaled my data > using the > scale(dataset) function. This was great at removing the skew, but I > now > can't perform the Box Cox transformation on the data set (using the > boxcox(dataset) function), as the scaling has returned negative > values.Scaling (at least that using the default approach with that function) should not "remove" skewness.> > So my question is: how can I get the scale function to return a > positive set > of data (so I can use Box-Cox),You could shift the scaled values to the right.> or how can I get the boxcox function to > handle negative values.Which boxcox function? And have you looked at all of its available parameters? -- David Winsemius, MD Heritage Laboratories West Hartford, CT