Announcement

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

  • #16
    Well, i did not explain it well. Yes, it creates a new variable from the one that is winsorized. If there are missing values in the un-winsorized variable, they are also replaced along with outliers to create a new winsorized variable. I meant that is it possible to have a new winsorized variable that retains the missing values as were in the un-winsorized variable. Hope that it is clear now.

    Comment


    • #17
      in Stata, a missing value is the largest possible value so any time you write x># Stata will automatically include missing as greater than #; if you want to exclude missing values, just add
      Code:
      & x<.
      replace "x" with whatever you are actually using (a variable name)

      Comment


      • #18
        Pardon. I could not get from #17 what actually I have to do.

        Comment


        • #19
          Actually, probably the simplest thing to do is just replace the computed values with missing value when the original rt is missing.
          Code:
          replace rtW = . if missing(rt)
          From your response in #18, I infer that you have not yet learned the very basics of Stata syntax. So before you continue production work on a project that requires at least a modest level of complexity, it is time for you to sit down and do the work of learning basic Stata. The best advice for doing that comes from William Lisowski and I quote it here:
          When I began using Stata in a serious way, I started - as others here did - by reading my way through the Getting Started with Stata manual relevant to my setup. Chapter 18 then gives suggested further reading, much of which is in the Stata User's Guide, and I worked my way through much of that reading as well. All of these manuals are included as PDFs in the Stata installation (since version 11) and are accessible from within Stata - for example, through Stata's Help menu.

          The objective in doing this was not so much to master Stata as to be sure I'd become familiar with a wide variety of important basic techniques, so that when the time came that I needed them, I might recall their existence, if not the full syntax, and know how to find out more about them in the help files and manual.

          Stata supplies exceptionally good documentation that amply repays the time spent studying it - there's just a lot of it. The path I followed surfaces the things you need to know to get started in a hurry and to work effectively.

          Stata also supples YouTube videos, if that's your thing.

          One particularly relevant piece of documentation is that concerning Stata's "date and time" variables, which are complicated and have a lot to learn, as you have encountered in this problem. If you have not already read the very detailed Chapter 24 (Working with dates and times) of the Stata User's Guide PDF, do so now. If you have, it's time for a refresher. After that, the help datetime documentation will usually be enough to point the way. You can't remember everything; even the most experienced users end up referring to the help datetime documentation or back to the manual for details. But at least you will get a good understanding of the basics and the underlying principles. An investment of time that will be amply repaid.

          Comment

          Working...
          X