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 (October 2001, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 26 Oct 2001 13:01:42 -0700
Reply-To:     Dale McLerran <dmclerra@MY-DEJA.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Dale McLerran <dmclerra@MY-DEJA.COM>
Subject:      Re: Chi-squared test when data is already tabulated
Comments: To:
Content-Type: text/plain


By tabulated data, I assume that you mean that you have the frequencies in each cell of the table. You can still use proc freq with the chisq option. You would table the two variables which form the contingency table, and weight each observation by the tabulated frequency. This is demonstrated below:

data test; x=1; y=1; n=40; output; x=2; y=1; n=60; output; x=1; y=2; n=30; output; x=2; y=2; n=70; output; run;

proc freq data=test; weight n; tables x*y / chisq; run;

Best wishes,


>Date: Fri, 26 Oct 2001 11:49:14 -0700 >Reply-To: Rachel Pearce <rpearce@U.WASHINGTON.EDU> > Rachel Pearce <rpearce@U.WASHINGTON.EDU> Chi-squared test when data is already tabulated SAS-L@LISTSERV.UGA.EDU >Is there a way to calculate the chisquare for a table in SAS when the >dataset >I have is the tabulated data, not the raw observations? I can't used proc >freq >with the chisq option, so is there a way to do it? > >Rachel

--------------------------------------- Dale McLerran Fred Hutchinson Cancer Research Center mailto: Ph: (206) 667-2926 Fax: (206) 667-5977 ---------------------------------------

------------------------------------------------------------ --== Sent via ==--

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