> From: Zsbán Ambrus
>
> On Tue, Sep 15, 2009 at 3:19 AM, Sherlock, Ric
> <[email protected]> wrote:
> > The definition for the Chi squared Cumulative Distribution Function
> given in the essay
> > http://www.jsoftware.com/jwiki/Essays/Chi%20Squared%20CDF and in the
> distribution.ijs script of the stats/base addon, seems to be unstable
> for large values.
>
> Could you use the functions from gsl? It does have a function for the
> cumulative distributive function of the chi square distribution. See
> my earlier emails on this list for similar examples if you need the
> details (sorry).
I'm glad to finally have the interface to GSL working on Windows!
load 'dll files'
BinPathGSL=: 'C:\Program Files\GnuWin32\bin\'
1!:44 BinPathGSL NB. change to bin folder (or add folder to PATH)
gsl_cdf_chisq_P=: ('"',BinPathGSL,'libgsl.dll" gsl_cdf_chisq_P >+ d d d')&cd
chisqcdfGSL=: [: gsl_cdf_chisq_P ,.~
400 chisqcdfGSL (73+i.10)
6.2641261e_79 5.7916681e_78 5.1628275e_77 4.4415298e_76 3.6909857e_75
2.9655489e_74 2.3056537e_73 1.7360753e_72 1.2669935e_71 8.9690132e_71
9 chisqcdfGSL 4
0.088587473
9 chisqcdfGSL 1415 + i.10
1 1 1 1 1 1 1 1 1 1
9 chisqcdfGSL 1472
1
400 chisqcdfGSL 73+i.10
6.2641261e_79 5.7916681e_78 5.1628275e_77 4.4415298e_76 3.6909857e_75
2.9655489e_74 2.3056537e_73 1.7360753e_72 1.2669935e_71 8.9690132e_71
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm