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:  [EMAIL PROTECTED] 


Graduate Officer, Department of Statistics

Webmaster, New Zealand Statistical Association:
        http://www.stat.auckland.ac.nz/nzsa/

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to