Announcement

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

  • Quintiles

    I have a large dataset with values corresponding to a visual acuity test (varname pellirob, values 0 to 2.25 in 0.15 jumps). I want to know the mean score and the N in the bottom quintile....the N I can work out from the total values entered for this set by excluding the missing....how do I find the mean score for the bottom quintile please?
    I have looked up and tried xtile and pctile but the values I get out don't look like what I need....help please!

  • #2
    Jocelyn:
    you may want to take a look at the following example:
    Code:
    sysuse auto.dta  
    xtile quintile = price, nq(5)
    bysort quintile: sum price if price!=.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Oh yes, that works brilliantly, thank you!

      Comment


      • #4
        How do I find the means for everything but the bottom quintile?

        Comment


        • #5
          Jocelyn (assuming that you refer to the 1st quintile as the bottom one):
          Code:
          sum price if price!=. & quintile!=1
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Thank you!

            Comment


            • #7
              Pedant's corner: there are 4 quintiles, but 5 quintile groups. (Similarly, there 99 percentiles and 100 percentile groups.) "Quintile group" is often abbreviated to "quintile" but this usage can often be misleading or inaccurate in my opinion (though luckily Carlo understood what you were looking for on this occasion and provided a helpful answer). I'd like to make a plea for precision in the use of these terms, especially given the statistical nature of this Forum.

              Comment


              • #8
                I agree with Stephen. Alternatives to quintile group are quintile band, quintile bin, quintile interval and just fifth. None of these is obviously better (or worse) than the others.

                Comment


                • #9
                  I find that "fifth" generalizes nicely to cases where I don't know the Latin root for the number of groups.

                  Or, perhaps, replacing "quintile" with "five quantiles", and similarly for other numbers of quantiles. For example, "the seventh of nine quantile groups/bands/bins/intervals" to me reads more felicitously than "the seventh ninth".

                  Comment

                  Working...
                  X