> I know from previous research that the RFI for each study is 5, 5, 10 and 4.
Well, the most likely explanation is that I misunderstood what you are asking for. So you need to clarify the problem. Please explain the above statement by constructing an example for Study A that runs Fisher's Exact Test and results in a significant p-value. In my previous response, I interpreted '5' for Study A to mean the following frequency table and analysis:
data A;
input Group Event Count;
datalines;
1 1 5
1 0 146
2 1 1
2 0 148
;
proc freq data=A;
tables Event*Group / norow nocol nopercent;
exact fisher;
weight Count;
run;
Please explain what table you want to analyze for Study A when '5' is used. Also, explain the logic by which you obtained the table. Then do the same explanation for Study C, which uses '10'.
Rick,
This is a method to review already published data. Below are the datalines for this table. The p-value for this dichotomous outcome is >0.05. The goal is to see the minimum number of nonevents that need to change to an event for each outcome measure in order for the nonsignificant p-value, as measured by Fisher's exact test, to become significant. Alpha level 0.05. Based on previous analysis, I know the minimum number of events needed is 5 for this study and want to determine a way to replicate the analysis in SAS.
data want;
input study $ group $ outcome $;
datalines;
A Exp Yes
A Exp Yes
A Exp Yes
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Exp No
A Con Yes
A Con Yes
A Con Yes
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
A Con No
;
run;
proc freq data= want;
table group*outcome /chisq fisher;
run;
Please explain the statement "Based on previous analysis, I know the minimum number of events needed is 5 for this study."
When I run your DATA step, I see it is equivalent to the following shorter program:
data Have;
length Study $1 Group $3 Outcome $3;
input study $ group $ outcome $ Count;
datalines;
A Con No 146
A Con Yes 3
A Exp No 148
A Exp Yes 3
;
proc freq data= Have;
table group*outcome /chisq fisher norow nocol nopercent;
weight count;
run;
You say that you can change 5 nonevents to events and get a significant p-value. Please show how. Here is a new data set in which I have changed 5 nonevents in the experimental group to events. Upon rerunning the analysis, I do not get a significant p-value:
data New;
length Study $1 Group $3 Outcome $3;
input study $ group $ outcome $ Count;
datalines;
A Con No 146
A Con Yes 3
A Exp No 143
A Exp Yes 8
;
proc freq data= New;
table group*outcome /chisq fisher norow nocol nopercent;
weight count;
exact fisher;
run;
If I change 5 observations from Yes to No in the control group, I also do not get a significant p-value. Show me what you do to the original data to get a significant p-value.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.