LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 1998, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 22 Dec 1998 11:40:22 GMT
Reply-To:     Javier <jportela@EUCMAX.SIM.UCM.ES>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Javier <jportela@EUCMAX.SIM.UCM.ES>
Organization: s
Subject:      Re: Still have problem with Chi Square...
Content-Type: text/plain; charset=us-ascii

>The SAS syntax to generate the probability >of a chi-square statistic should be: > > pvalue= 1 - probchi(chi, df); > >where for this application, df=3. > >NOT: >> pvalue=probchi(N-1,chi); > >The latter syntax, swaps the position of >the chi-sqaure varaite and the model df and >does not subtract the obtained quantity >from unity. > > >A chi-square of 6.35 judged against 3 df >has a p-value of 0.0955--not 0.1605. >Still, the null should be rejected at >conventional levels of statistical >significance. > > > >Steve Gregorich >

That's true.

probchi(df,x)=P(X<=x), were X is the random variate chi-square with df degrees of freedom.

And the p-value is the probability of the "right tail area" under the distribution, from x to infiny...

So change probchi(N-1,chi)

by

1-probchi(N-1,chi)

in the program.

(It gives P=0.838986911, not 0.0955, i do not understand Steve's result. You should accept H0.)

Thanks, Steve, and sorry, Harvey.


Back to: Top of message | Previous page | Main SAS-L page