Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • third root for negative values

    Hey guys,

    I have positive and negative values and a lot of outliers in my data. Therefore I decided to use a monotonic transformation. I wanted to use the third root because of the s-form of the function and I implemented it like this:

    Code:
    gen thsqrtNettovermögen_a = Nettovermögen_a^(1/3)
    The problem is that stata only transformed the positive values and the negative values are simply missing and I don't understand why.

    thanks in advance

    Ben

  • #2
    https://journals.sagepub.com/doi/pdf...867X1101100112

    Comment


    • #3
      Thank you Felix, that was really interesting! I think I will export my data into excel, transform the data there and reimport it.

      Comment


      • #4
        Why not use the suggested workaround

        Code:
        sign(y) * abs(y)^(1/3)
        ?

        Comment


        • #5
          The main point behind the paper cited by Felix is that you really do not need to use Excel for this! It's one line in Stata:
          Code:
           gen thsqrtNettovermögen_a = sign(Nettovermögen_a) * abs(Nettovermögen_a)^(1/3)

          Comment


          • #6
            Ups I guess I missed the point. Thank you guys. I will use the workaroung

            Comment

            Working...
            X