Announcement

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

  • range of quartiles

    Dear colleagues,
    I have created 4 quartiles of a variable (age) that goes form 18 to 89. What is the command if i would like to know the range of the second quartile for example?

    thanks for your help


    stata/IC 15.1 mac

  • #2
    I think you mean 4 quartile bins or classes. This may help in terms of technique:


    Code:
    . sysuse auto, clear
    (1978 Automobile Data)
    
    . xtile mpg4=mpg, nq(4)
    
    . tabstat mpg, s(n min max) by(mpg4)
    
    Summary for variables: mpg
         by categories of: mpg4 (4 quantiles of mpg)
    
        mpg4 |         N       min       max
    ---------+------------------------------
           1 |        27        12        18
           2 |        11        19        20
           3 |        22        21        25
           4 |        14        26        41
    ---------+------------------------------
       Total |        74        12        41
    ----------------------------------------

    Comment

    Working...
    X