Announcement

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

  • How to find value for upper adjacent value in boxplot?

    I would like to know the value of the upper adjacent value in a boxplot I have, so that I can exclude all the outliers and compare the regressional results. However, I cannot find an option to include the value. The help sheet gives following formula


    Let x represent a variable for which adjacent values are being calculated. Define x(i) as the ith ordered value of x, and define x[25] and x[75] as the 25th and 75th percentiles. graph box — Box plots 17 Define U as x[75] + 3/ 2 (x[75] − x[25]). The upper adjacent value is defined as xi , such that x(i) ≤ U and x(i+1) > U.

    Define L as x[25] − 3 /2 (x[75] − x[25]). The lower adjacent value is defined as xi , such that x(i) ≥ L and x(i−1) < L.
    Code:
    su var, d
    tells me that my x 75 is 160000 and my x25 is 25000

    so my U is = 295000

    However, when I graph the variable this doesn't seem very realistic. I attached the graph. But the upper value shoud be around 360000.

    Am I doing something wrong with the math, or what am I missing? How can I figure the value out? Or is there an easier way to find out the outliers? Note that this is just a small sample used in the graph, I have a lot of outliers so playing with the graph settings till I can physically see the first outlier (and exclude all observations with values that are similar to it or above) really isn't something I want to do.
    Attached Files
    Last edited by Oscar Weinzettl; 12 Sep 2019, 03:31.

  • #2
    Code:
    . dis 160000 + (3/2)*( 160000 - 25000)
    362500

    Comment


    • #3
      I don't know how I got that wrong. Thank you very much! What a childish error on my side.

      Comment

      Working...
      X