Sciencemadness Discussion Board
Not logged in [Login ]
Go To Bottom

Printable Version  
Author: Subject: need help coding a chi-squared function
spirocycle
Hazard to Others
***




Posts: 197
Registered: 29-9-2010
Member Is Offline

Mood: No Mood

[*] posted on 19-5-2011 at 16:45
need help coding a chi-squared function


I'm working on a program used to calculate confidence intervals for age-adjusted cancer rates based on the Fay Feuer method.
I've got all the bits hammered out except one major piece: the inverse-chi-squared function.

I have a pretty sneaky method that uses a binary guessing system to converge on the target value, but that hinged on a working chi-squared CDF function.

This is where my skills fail!

My current attempt was approximating the integral using simpson's method. The major problem with this is that I cant integrate from 0 when the degrees of freedom are less than two, because a horizontal asymptote appears. If I try to start the integration from an arbitrarily small value (0.0001 or so), I either get a math overflow error or a very innaccurate result. Any suggestions?
View user's profile View All Posts By User

  Go To Top