Announcement

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

  • Plotting percentiles vs another variable

    I'm using STATA 12. I need to graph age distribution - normalized by mean age - across households' income for 5th, 50th and 95th percentiles.

    Code:
    egen p5 = pctile(inc), p(5)  
    
    egen p50 = pctile(inc), p(50)  
    
    egen p95 = pctile(inc), p(95)  
    
    egen meanage= mean(age)
    
     gen v1 = age/meanage
    I don't know how to store those percentiles into one variable and then plot them against v1. Please help!
Working...
X