Dear All
Suppose I have following data set:
data test;
input row col count;
cards;
1 1 11
1 2 4
2 1 13
2 2 1
;
run;
Because this data set violates the proportion test assumption, I need to do continuity correction; and I also need to perform one sided test.
So I ran following codes:
proc freq data=test;
tables row*col/riskdiffc (EQUAL);
weight count;
run;
The one-sided p-value I got from running this SAS code is 0.1719.
However when I try to solve the exactly same problem using R, I got one-sided p-value=0.8157.
My question is: why the p-values from SAS and R are different?
Personally I think p-value=0.8157 (from R) is correct, as proportion1 is greater than proportion2 suggesting the p-value should be greater than 0.5.
Did I make any mistake in my SAS coding?