1
votes

I am trying to compare tumors or not for 2 different groups. However, when I run the Proc Freq it shows the results in different charts. What should I do differently?

Code

 proc freq data=tCto502 order=data;
  by Group;
  table TumorYesorNoCoded*Group / fisher;
  run;

I got the following notes.

NOTE: No statistics are computed for TumorYesorNoCoded * Group because Group has fewer than 2
      nonmissing levels.
NOTE: The above message was for the following BY group:
      Group=50
NOTE: No statistics are computed for TumorYesorNoCoded * Group because TumorYesorNoCoded has fewer
      than 2 nonmissing levels.
NOTE: The above message was for the following BY group:
      Group=Control

Results Data Results I am trying to get layout wise to get my p-value and such

1

1 Answers

1
votes

You dont need the group by, since the table argument is already combining TumorYesorNoCoded*Group.

Just run:

proc freq data=tCto502;
  table TumorYesorNoCoded*Group / fisher;
  run;

Edited:

After the question was updated with the desired output, to get the exactly the same result, you can run:

proc freq data=tCto502 order=internal;
table Group*TumorYesorNoCoded / fisher NOCOL NOPERCENT NOROW;
run;