[SciPy-user] noncentral F distribution?
Thu May 28 09:56:48 CDT 2009
On Wed, May 27, 2009 at 8:07 PM, Robert Kern <firstname.lastname@example.org> wrote:
> On Wed, May 27, 2009 at 18:59, Neal Becker <email@example.com> wrote:
>> Robert Kern wrote:
>>> On Wed, May 27, 2009 at 18:47, Neal Becker <firstname.lastname@example.org> wrote:
>>>> Thanks! Just one more. What are dfn, dfd? The doc calls them "shape
>>>> parameters", but I don't know what that means.
>>> A "shape parameter" is a generic term for any parameter that is not a
>>> location or scale parameter. In this case, dfn is the parameter for
>>> the degrees of freedom in the numerator of the expression for the F
>>> distribution (whether it is noncentral or not) and dfd is the degrees
>>> of freedom in the denominator.
>> I think I get it now. I had assumed that you must first construct an
>> instance of a ncf object (specifying parameters) and then call the cdf
>> method (specifying x).
>> Now I see that you simply call:
>> ncf.cdf (x, dfn, dfd, nc)
>> Is that correct?
> You can do either, actually.
> ncf(dfn, dfd, nc).cdf(x)
> ncf.cdf(x, dfn, dfd, nc)
> The rv_continuous docstring is a bit clearer on this point than the
> individual distributions' docstrings.
>> BTW, I was confused by:
>> scipy.stats.ncf(momtype=1, a=None, b=None, xa=-10.0, xb=10.0, xtol=1e-14,
>> badvalue=None, name=None, longname=None, shapes=None, extradoc=None)
>> which is the first thing seen in the doc. It appears to be the constructor
>> declaration? These parameters don't seem to be defined anywhere.
> Heh. Yeah. The thing this, scipy.stats.ncf is actually an instance of
> a class, not a class itself. The doc generator is picking up the
> __init__ of the class rather than the __call__. But even then,
> __call__ just takes *args, **kwds and parses them according to the
> data it is configured with. The doc generator will probably need some
> special support to document the distributions properly.
I usually do the following, so I didn't see that help(..) doesn't
include the generated docstring
>>> print scipy.stats.ncf.__doc__
A non-central F distribution continuous random variable.
Continuous random variables are defined from a standard form and may
require some shape parameters to complete its specification. Any
optional keyword parameters can be passed to the methods of the RV
object as given below:
- random variates
- probability density function
- cumulative density function
More information about the SciPy-user