Announcement

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

  • #16
    Appreciate the feedback Professor Cox! I think I should be good for now.

    Comment


    • #17
      Hi. I asked this question yesterday and had a follow-up question on it.
      It seems that when I divide by entire sample (which consists of NYSE, AMEX and NASDAQ firms from 1963-2013) on each December 31st into quintiles using the code in #14, I get equal sized quintiles!

      However, my issue is that when I try to track those firms over a course of one year, that is (starting in April 1964 and ending in March 1965), if a firm is in quintile 1 from its ranking on Dec 1963, I place it in the same quintile 1. One other example would be if a firm is in quintile 5 on Dec 1963, that firm should be in quintile 5 from April 1964 - March 1965.

      Theoretically, I should be getting equal number of firms in each quintile, because in my december ranking, the firms in each quintile are approximately the same!


      Specifically, the rankings in each December are as follows
      Freq.| Percetile | Cumulative
      Q1 | 8,498 | 20.06 | 20.06
      Q2 | 8,472 | 19.99 | 40.05
      Q3 | 8,479 | 20.01 | 60.06
      Q4 | 8,468 | 19.98 | 80.05
      Q5 | 8,455 | 19.95 | 100.00



      But strangely, when I track the firms for the one year span, I get

      Q1 95,003 20.14 20.14
      Q2 95,788 20.30 40.44
      Q3 95,249 20.19 60.63
      Q4 94,815 20.10 80.73
      Q5 90,928 19.27 100.00

      So about 3000 firms less in Q5 than compared to the other firms...

      Any ideas on this? I've been trying to figure this out since yesterday and no one at my school seems to know
      Please help!

      Comment


      • #18
        Dear Nick,

        I am looking for a way to obtain the breakpoints of a data set based on quintiles.

        I have tried the tabstat for see the variable values per 25%, 50%, 75%. I would like to see the same overview for 20%, 40%, 60%, 80%, 100% but it failed. Can you please recommend me a way to do it? Thanks!

        --------------------------------------------
        . tabstat MV, stats (n p25 p50 p75)

        Variable | N p25 p50 p75
        -------------+----------------------------------------
        MV | 94298 39.25724 143.6577 644.9975
        ------------------------------------------------------

        Comment


        • #19
          Code:
          . sysuse auto, clear
          (1978 automobile data)
          
          
          . centile mpg, c(0 20(20)80 100)
          
                                                                    Binom. interp.   
              Variable |       Obs  Percentile    Centile        [95% conf. interval]
          -------------+-------------------------------------------------------------
                   mpg |        74          0          12              12          12*
                       |                   20          17        14.84544          18
                       |                   40          19              18    20.48391
                       |                   60          22              20          24
                       |                   80          25              24    28.15456
                       |                  100          41              41          41*

          Comment

          Working...
          X