Hi, I am trying to create a 2x2 table and gather chisq. However, my treatment variable is by default showing up as 2 then 1 but i wanted it in ascending (1 then 2). My response variable is outputting correctly (1 then 0).
Here is my code:
PROC SORT data = dtanl.hivcancerdta;
by descending cancer;
RUN;
PROC FREQ data = dtanl.hivcancerdta order = data;
TABLE alcoh*cancer / chisq riskdiff or;
WHERE alcoh ^= 9;
RUN;
My output is:

Any information on what i am doing wrong would be appreciated!
Thanks!