A couple of things to note. You have 2 cells out of 9 where the counts are less than 5. Beware of using the standard chi squared test. Your code calls for the exact option, so looking at the exact test results should inform you as to your next step. Assuming you have identified that at least one column has a different association with the response variables than another. You get 2 chances to test this, so you need to clearly identify what question you are trying to answer. One way might be to ask: "Is anesthesia different from general surgery" and "Is EM different from general surgery". In this case, you have identified general surgery as a reference category. So you run follow-up analyses where you subset the data to include only anesthesia and general surgery in the first case and only EM and general surgery in the second case. Those are your 2 chances to test under the reference scenario. Another scenario might be to test 1)Is the collapsed incidence of anesthesia and EM different from general surgery and 2)Is anesthesia different from EM? What you shouldn't do is the all possible comparisons of anesthesia vs. general surgery, EM vs. general surgery, and anesthesia vs. EM.
So how do you go about this? The reference scenario can be done in two separate PROC FREQ calls, using a where= clause in the data= option to select the two columns of interest in each case. The second scenario involves some DATA step preprocessing to collapse the observations in two categories to a single category and then comparing the "collapsed" column to the third in one PROC FREQ call, and comparing the two categories involved in the collapse in a second PROC FREQ call.
SteveDenham
... View more