0
$\begingroup$

I am having trouble finding the transformation operation for left/negatively skewed data. The catch? All of my values are between 0 and 1. As such, trying the standard log10 transformation command computes a bunch of NAs.

log10(max(df$Var+1) - df$Var)

What do you recommend?

I computed the skewness at -0.6818167

Thank you

$\endgroup$
4
  • 3
    $\begingroup$ Log transforms will not tend to make left skewed data less skew, but more; nor is it always useful with right skew distributions (sometimes it does hardly anything, sometimes it leaves you with more left skew than the right skew you might have had). However, often people are transforming variables needlessly, even counterproductively. What are you doing that would lead you to need to make this variable less skew? What does the variable measure? $\endgroup$
    – Glen_b
    Commented Jul 11 at 1:37
  • $\begingroup$ Can a subset of your data be shared AND how the data was generated AND your objective? If all values are between 0 and 1 (and none of the values are 0 or 1), then depending on how the data was generated, you might try log(df$Var/(1-df$Var)). But maybe a better approach is to not transform and if simply describing your data is the objective then maybe use a nonparametric density estimate (using density or a function described in vita.had.co.nz/papers/density-estimation.pdf). $\endgroup$
    – JimB
    Commented Jul 11 at 1:39
  • 3
    $\begingroup$ Your question actually begs a more important question...why are you transforming this variable in the first place? Is this for a regresson? If so, please specify how your variables in your regression are being used. This will allow others to provide a better answer for you, as transformation may not even be necessary depending on your use-case. $\endgroup$ Commented Jul 11 at 4:37
  • 2
    $\begingroup$ If you must use a logarithm, then apply it to the right skewed dataset obtained by subtracting each value from 1. But, as the preceding comments suggest, that's just a bandaid. We would prefer to understand your underlying statistical problem so we can give more useful advice. $\endgroup$
    – whuber
    Commented Jul 11 at 13:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.