From: SourceForge.net <no...@so...> - 2007-12-31 19:45:19
|
Feature Requests item #1861370, was opened at 2007-12-31 08:58 Message generated for change (Comment added) made by erickb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=362883&aid=1861370&group_id=12883 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: math Group: None Status: Open Priority: 5 Private: No Submitted By: Eric Kemp-Benedict (erickb) Assigned to: Nobody/Anonymous (nobody) Summary: Submission: Chi-squared distribution Initial Comment: Hi, I'm submitting an implementation of the (central) chi-squared distribution. This time around, I did a more systematic job of testing the code, by using a test-driven development approach. To do that, I used my little "simple test" library. I'm attaching the code that implements the chi-squared library first. Then I'll post the simple test code. Dependencies: - Gamma distribution - Simple test Eric ---------------------------------------------------------------------- >Comment By: Eric Kemp-Benedict (erickb) Date: 2007-12-31 14:45 Message: Logged In: YES user_id=816411 Originator: YES This is an improved inverse chi-square. More robust than the original. Also tested to tolerance of 1.0e-9 against R output. File Added: invchisqr.tcl ---------------------------------------------------------------------- Comment By: Eric Kemp-Benedict (erickb) Date: 2007-12-31 10:06 Message: Logged In: YES user_id=816411 Originator: YES Hello, I'm adding to this an implementation of the inverse cumulative chi-squared distribution, since that's needed for statistical inference. It's a straightforward implementation of root solving. It turned out to be a little "touchy", but I think I've covered enough extreme cases that I can be pretty sure it will behave robustly. This has "source chisqr.tcl" at the top of the file and runs the tests at the bottom of the file, but it could really be put directly into the "chisqr.tcl" file. Eric File Added: invchisqr.tcl ---------------------------------------------------------------------- Comment By: Eric Kemp-Benedict (erickb) Date: 2007-12-31 08:58 Message: Logged In: YES user_id=816411 Originator: YES File Added: simpletest.tcl ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=362883&aid=1861370&group_id=12883 |