[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
James Shaw <[email protected]> |

To |
[email protected] |

Subject |
st: Problem with centile and normal confidence limits |

Date |
Wed, 5 Sep 2007 15:33:29 -0700 (PDT) |

Dear Statalist: I am having trouble replicating the normal confidence limits produced by -centile-. The manual states that the standard error (Sq) of a given quantile, Cq, may be computed under the assumption of normality using the equation on p. 202 in the Stata Reference Manual (Release 9, A-G). However, I have to multiply Sq by sqrt(n) to get the same endpoints as Stata. My sample code and output are provided below. I am not sure why I cannot replicate Stata's results using the equation presented in the manual. Given that I can approximate the limits produced by -centile, normal- using the bootstrap, I suspect that the notation in the manual may be incorrect. I do not have access to the original source (Kendall & Stuart) and am therefore unable to verify whether or not this is the case. Regards, Jim . drawnorm y . qui: summ y . scalar sm1= r(mean) . scalar sd1 = r(sd) . scalar sn = r(N) . qui: centile y, normal . scalar smd2 = r(c_1) . scalar stul = r(ub_1) . scalar stll = r(lb_1) . /* from Stata */ . scalar li smd2 stul stll smd2 = .02788301 stul = .10364515 stll = -.04787914 . scalar sq = sqrt(50*(100-50))/(100*sn*normalden(smd2,sm1,sd1)) . /* using formula given in manual */ . scalar ul11 = smd2 + sq*invnormal(.975) . scalar ll11 = smd2 - sq*invnormal(.975) . scalar li smd2 ul11 ll11 smd2 = .02788301 ul11 = .03027881 ll11 = .0254872 . /* multiplied by sqrt(n) */ . scalar ul12 = smd2 + sq*invnormal(.975)*sqrt(sn) . scalar ll12 = smd2 - sq*invnormal(.975)*sqrt(sn) . scalar li smd2 ul12 ll12 smd2 = .02788301 ul12 = .10364515 ll12 = -.04787914 ____________________________________________________________________________________ Yahoo! oneSearch: Finally, mobile search that gives answers, not web links. http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC * * For searches and help try: * http://www.stata.com/support/faqs/res/findit.html * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

- Prev by Date:
**st: clustering in proportional hazards models with stata/mp 10.0** - Next by Date:
**Re: st: svy proportion - confidence intervals** - Previous by thread:
**st: clustering in proportional hazards models with stata/mp 10.0** - Next by thread:
**Re: st: Problem with centile and normal confidence limits** - Index(es):

© Copyright 1996–2024 StataCorp LLC | Terms of use | Privacy | Contact us | What's new | Site index |