Re: P-value from chi-square value: source code
- From: "Dhruv" <bhaveshrb@xxxxxxxxx>
- Date: 16 Apr 2005 10:40:29 -0700
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;
> > }
.
- References:
- P-value from chi-square value: source code
- From: Dhruv
- Re: P-value from chi-square value: source code
- From: Ian Smith
- Re: P-value from chi-square value: source code
- From: Dhruv
- P-value from chi-square value: source code
- Prev by Date: Re: poisson distribution
- Next by Date: Re: P-value from chi-square value: source code
- Previous by thread: Re: P-value from chi-square value: source code
- Next by thread: ordinal logistic regression
- Index(es):
Relevant Pages
|