[R] Non-central distributions

Martin Maechler maechler at stat.math.ethz.ch
Fri Oct 18 08:45:54 CEST 2002


>>>>> "Bill" == Bill Venables <Bill.Venables at cmis.csiro.au>
>>>>>     on Fri, 18 Oct 2002 14:19:26 +1000 writes:

    Bill> Ted Harding says:
    >> -----Original Message-----
    >> From: 	Ted.Harding at nessie.mcc.ac.uk
    >> Sent:	Friday, October 18, 2002 2:14 AM
    >> To:	Peter Dalgaard BSA
    >> Cc:	r-help at stat.math.ethz.ch
    >> Subject:	Re: [R] Non-central distributions
    >> 
    >> Thanks, Peter! (Must try to give this some thought ...).

    Bill> [WNV] The density functions for the t and F
    Bill> distributions are in fact quite easy and only require
    Bill> hypergeometric functions in addition to standard
    Bill> things.  These could be useful anyway for all sorts of
    Bill> things.  As far as I know, percentage points of the
    Bill> non-central distributions are not much used, but what
    Bill> would be very useful would be to have the percentage
    Bill> points (with respect to the non-centrality parameter)
    Bill> of the distribution function G(delta) = 1-P(X^2, n,
    Bill> delta), (i.e. you take the upper tail area as defining
    Bill> a distribution function in delta.  Such a distributon
    Bill> has a finite probability at the origin, of course.
    Bill> These are the quantities you need, for example, for
    Bill> things like sample size determination and power calculations.

probably an exercise of reading the sections in Johnson et al
(see "HRK" below). I remember having seen quite a few references there.
Contributions are welcome..

    Bill> Random numbers from the non-central distributions are
    Bill> easy enough to generate, of course, using the central
    Bill> ones.  Again, I'm not sure just how much slick
    Bill> versions of them would be useful, though.

In the next major version of R, 1.7.x,
I plan to have finished the code for rchisq(*, ncp = *)
{and possibly for some of  ?chisq(*, df = 0, *) }
thanks to a suggestion from Hans R. Kuensch:

  HRK> I think the help file for the Chisquare distribution should
  HRK> indicate clearly whether df has to be a natural number or can be
  HRK> any positive number. Also I don't understand why rchisq works
  HRK> only in the central case. It should be easy to do the general
  HRK> case by decomposing it as the sum of a central chisquare with df
  HRK> degrees of freedom plus a noncentral chisquare with zero degrees
  HRK> of freedom (which is a Poisson mixture of central chisquares
  HRK> with integer degrees of freedom), see Formula (29.5b-c) in
  HRK> Johnson, Kotz, Balakrishnan (1995).  The noncentral chisquare
  HRK> with arbitary degrees of freedom is of interest for simulating
  HRK> the Cox-Ingersoll-Ross model for interest rates in finance.


    >> Anyway, in this respect R is still ahead of S-Plus, which
    >> doesn't seem to carry ANY non-centrality as standard!
    >> (Except possibly obscurely tucked away in some add-on library).

    Bill> [WNV]  Tsk tsk, Ted.  They are there for pf and pchisq, at least.

     [ but of course, R is still ahead  ;-) ;-) ]

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list