I might have worded my question poorly. I am trying to perform chi square between variables in two separate categories. The categories are DineHal1 and DineHal2. I want to do the chi square analysis between Salads1 and NEplates ONLY under DineHall1. Then I want to do the same chi square analysis for DineHal2. The problem I am running into is that the data for DineHal1 and DineHal2 are combining and the chi square analysis is looking at all of the data for Salads1 and NEplates for both DineHal1 and DineHal2. DineHall Salads1 NEplates DineHal1 1 3 DineHal1 0 2 DineHal1 1 1 DineHal1 1 2 DineHal1 0 1 DineHal2 1 3 DineHal2 0 3 DineHal2 0 1 DineHal2 0 1 DineHal2 1 2 This is roughly how the data looks in the excel sheet if that helps explain my situation any better. I have previously coded: proc freq; tables (Salads1 NEplates)*DineHall/chisq; run; The program runs the analysis, and it looks at DineHal1 and DineHal2 combined. So to look at chi square for just DineHal1, I tried this coding: If DineHall="DineHal2" then delete; run; When I run that analysis, it comes up with multiple errors. How do I look solely at the variables under DineHal1 or DineHal2?
... View more