I am trying to convert data to a vector in R.
This is not for linear regression, so I do not have a predictor-response relationship. I just use a model that will improve accuracy by normalizing my data. (therefore, I cannot use the boxcox function since it only works with linear models).
The data I'm trying to convert:
vect
[1] 99.64 49.71 246.84 96.17 16.67 352.00 421.25 81.77 105.00 37.85
I looked at this post .
It is not clear what is being done and how the optimization function is used, but I managed to change the function to create a function that I would like to minimize.
xskew <- function(data,par) {
abs(skewness((data^par-1)/par)) }
I would like to introduce a sequence of values for lambda (possibly between 0.5 and 1 with jumps of 0.01) and find which of these values minimizes xskew for my data set.
, , , .
?
edit: - :
x <- seq(0.51,0.99,by=0.01)
which(xskew(vect,x) < 0.05)
, , . , , .