Announcement

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

  • unrecognized command: winsor

    Dear all,

    I would like to use the following command:

    Code:
    winsor turn_ratio, gen (w_turn_ratio) p(0.01)
    replace turn_ratio=w_turn_ratio
    however, I receive a message

    Code:
    unrecognized command:  winsor
    r(199);
    
    end of do-file
    
    r(199);
    Should I install smth additional to use it? I have Stata13

  • #2
    -winsor- is a user-written command. It does not come with Stata.
    If you type -findit winsor- from within Stata you will see that there are two available commands: winsor and winsor2
    Type -ssc describe winsor- and -ssc describe winsor2- to see what they do.
    To install: ssc install winsor- or -ssc install winsor2- depending on which one you want.
    All the above instructions have to be typed from within Stata

    Comment


    • #3
      I don't know anything much about winsor2 but the approach used here in #1 in applying winsor (SSC, as Eric helpfully explains) is indefensible to my mind. Once you have a winsorized variable you can use that as seems sensible but using it to overwrite the original variable is utterly appalling practice. You should always want to an eye on the original variable and see how much difference winsorizing makes.

      Comment


      • #4
        @Nick Cox: the little I saw of it, when searching for it in Stata, gave me that impression, too. I had never heard of it before.

        Comment


        • #5
          My own position is twofold. I wrote winsor a while back as a programming challenge and retain a long-term interest in winsorizing as one way of getting robust (in the non-econometric sense) estimates of location for single variables.

          It's bitter-sweet that it appears to be one of my most popular downloads and (from questions on it) largely because people want to winsorize variables as a preliminary to regression. Personally I can think of many more attractive ways to think about awkward tails in regression.

          Comment


          • #6
            Thanks a lot!

            Comment

            Working...
            X