Announcement

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

  • winsorizing data failure

    Hi all,

    When I try to winsorize my data for one of my columns using this command:

    - winsor wx_patent cuts(1 99) suffix(_new) I receive an error that says: factor-variable and time-series operators not allowed. but indeed wx_patent is a 'float object' it is neither a factor variable nor a time-series operator. Also, the command works fine for all my other columns. Any idea what's going on here?
    Last edited by sladmin; 06 Aug 2024, 10:02. Reason: anonymize original poster

  • #2
    Is it winsor or winsor2? My guess is you missed the comma before cuts.

    Comment


    • #3
      Originally posted by Ken Chui View Post
      Is it winsor or winsor2? My guess is you missed the comma before cuts.
      Awesome. That solved the problem. Thank you so much.

      Comment


      • #4
        To be clear, as Ken Chui pointed out, winsor2 from SSC is the command that supports a cuts() option. Its author acknowledges ideas from winsor on SSC, which is mine.

        I wrote winsor originally in 1998 because someone asked for some Winsorizing code. I see most point in its use just before calculating a winsorized mean or variance. But its use for taming outliers is further than I ever want to take it.
        Last edited by Nick Cox; 12 Sep 2023, 01:04.

        Comment

        Working...
        X