[R] Confidence Band for empirical distribution function

David Scott d.scott at auckland.ac.nz
Thu Jul 24 23:56:53 CEST 2003

On Thu, 24 Jul 2003, Hotz, T. wrote:

> Dear Kjetil,
> As I already mentioned, it appears that there isn't a function 
> available calculating the quantiles directly (at least, it doesn't appear
> in the C source of ctest). So as I already suggested, uniroot (or a similar
> C routine which calls the corresponding C code directly) is probably the 
> best you can do (apart from writing it completely yourself).
> I didn't program this using uniroot, but I'd certainly try the following 
> for speed-up:
> - For symmetry reasons, you only need to compute half of the quantiles.
> - The quantiles depend smoothly on the probabilities (of your reference
> distribution). Therefore, calculating only a "few" for probabilities 
> between 0 and 0.5, and using (e.g. linear) interpolation should be
> satisfying.

There is an example of this in my package HyperbolicDist which has just 
appeared on CRAN. It is a little more sophisticated in that it fits a 
spline in preference to linear interpolation, before using uniroot.

Look at qhyperb if this is of interest.

David Scott

David Scott	Department of Statistics, Tamaki Campus
		The University of Auckland, PB 92019
		Auckland	NEW ZEALAND
Phone: +64 9 373 7599 ext 86830		Fax: +64 9 373 7000
Email:	d.scott at auckland.ac.nz 

Graduate Officer, Department of Statistics

Webmaster, New Zealand Statistical Association:

More information about the R-help mailing list