Announcement

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

  • How do I determine if differences between groups at p10 and p90 are statistically significant using survey data?

    Hello,

    I am trying to determine whether the Black-White wealth differences at p10 and p90 are statistically significant using SCF data. I am able to use tabstat or table to calculate the percentile values - however, I'm stumped on how to determine whether they are statistically significant. I believe ttests aren't to be used here since I'm not looking at means. Please point me in the right direction - I'd appreciate it.

  • #2
    you have a mean at each p. ttest works.

    Comment


    • #3
      Originally posted by George Ford View Post
      you have a mean at each p. ttest works.
      Thanks, George. By any chance, do you know how to change the ttest command to where it looks at percentiles instead of means? Or what syntax to use?

      Comment


      • #4
        I would use qreg:

        Code:
        qreg wealth i.black, quantile(10)
        Best wishes

        (Stata 16.1 MP)

        Comment


        • #5
          Code:
          clear all
          
          set obs 100000
          g y = rgamma(100,100)
          
          egen dec = xtile(y) , n(10)
          
          ** basic reg for all deciles
          reg y i.dec
          
          ** test only 1, 10
          reg y i.dec if inlist(dec, 1,10)
          
          ** ttest
          ttest y if inlist(dec,1,10) , by(dec)
          di r(t)

          Comment

          Working...
          X