Announcement

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

  • Margins with percentile

    Dear Statalists,
    I have obtained the following graph from my marginsplot command (see code below). Is there a command that allows me to spread the percentiles nicely (with equal distance/gap) on the x-axis? As the graph shows, there is a larger visual gap between 75th and 99th than 1th to 25th.
    Many thanks for your support.
    Code:
    *** IC x IC x GDP
    sum cGDP_10000 if valid==1
    global H_gdp = r(mean) + r(sd)
    global L_gdp = r(mean) - r(sd)
    
    _pctile gmcInfComp, p(1 25 50 75 99)
    margins, at (gmcInfComp=(`r(r1)' `r(r2)' `r(r3)' `r(r4)' `r(r5)') cGDP_10000=($L_gdp $H_gdp)) predict(mu)
    Click image for larger version

Name:	Margins.png
Views:	1
Size:	435.6 KB
ID:	1649229
Working...
X