[SciPy-user] Usage of scipy KS test
Wed Jan 2 13:44:55 CST 2008
thanks a lot for the quick reply, but your suggestion does not seem to work.
On Jan 2, 2008 5:08 PM, Anne Archibald <email@example.com> wro
> This format is more complicated than what we need. scipy.stats.kstest
> wants the list of (not necessarily sorted) x values, and a function
> that evaluates the CDF. The simplest thing to do is provide it your
> function that evaluates the CDF rather than computing m. If, however,
> you have already computed m, you can cheat: scipy.stats.kstest only
> needs to evaluate the function at the points in x, so you can create a
> function based on dictionary lookup:
> This should return a tuple containing the KS D value and the
> probability a data set like this one would be obtained from a
> probability distribution with your CDF.
When I use your suggestion, I get an error:
File "/usr/lib/python2.4/site-packages/scipy/stats/stats.py", line 1716, in
cdfvals = cdf(vals, *args)
TypeError: unhashable type
I tried with get(), but this also did not work. Also, in this example I do
not see the vector 'm' containing the modeled values. They must enter
somehow the expression....
Assumed, I calculate the D-value by myself. Can I then use stats.ksprob to
calculate the probability? Do I have to use sqrt(n)*D as argument?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user