Re: P-value from chi-square value: source code



Hello,

Folks, I am still struggling with the chi-square to P-value problem !!!

Could u tell me exactly how to use this function chi_cdf. Which header
file to include and stuff ???

thanks
Dhruv



DZ wrote:
> P.S. The p-value is 1-chi_cdf(ChiSquare, df)
>
> DZ wrote:
> > Dhruv <bhaveshrb@xxxxxxxxx> wrote:
> >> Ian Smith wrote:
> >>> "Dhruv" <bhaveshrb@xxxxxxxxx> wrote
> >>> > Could anyone send me a link to the source code in C++ for
> >>> > calculating the P-value from a chi-square value.
> >>> You are looking for code to evaluate the upper tail probability
of a
> >>> chi-squared distribution.
> >>> http://odin.mdacc.tmc.edu/anonftp/#DCDFLIB
> >>
> >> I actually tried the code and am having some problems with it. I
am
> >> sort of a newbie to programming and though I have managed to write
> >> some good code, I am unable to figure out the problem at present.
> >> What I need basically is a function which takes in Chi-square
value
> >> and returns the P-value. Please help me on this.
> >
> > You need to compile the library and use the function "cdfchi" ,
> > passing parameters as addresses, for example:
> >
> > double chi_cdf (double ChiSquare, double df) {
> > double q, p, bound;
> > int which=1, status;
> > cdfchi(&which, &p, &q, &ChiSquare, &df, &status, &bound);
> > return p;
> > }

.



Relevant Pages

  • Re: ContentLength trouble!
    ... Try amending your code to the following ... I've been struggling with this POST problem for more than three hours ... I know this means that the Content-Length header needs to be set. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Header On first Page Only
    ... I've been struggling trying to get my letterhead to appear in the top header ... Format » Document » Layout ...
    (microsoft.public.mac.office.word)
  • help with reports and formatting
    ... i am struggling with a specific report i need to produce. ... have a header on the left side of the page and then 6 columns of data ... from the database and then repeat the format on the following pages ...
    (microsoft.public.access.reports)
  • Re: Removing a page
    ... You shouldn't have to delete header (and footer) contents separately, ... since the page will disappear anyway when it is completely blank. ... This should be so simple but i am struggling to find out how I can ...
    (microsoft.public.word.docmanagement)

Quantcast