Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
trungdungtran
Obsidian | Level 7

Hi all,

 

I have run proc freq to test association between two binary variables using the Fisher's exact test. However, the outputs seem contradict to each other as Two-sided Pr <= P 0.0355 whereas the OR and the 95% Confidence Limits 0.1097 [0.0118, 1.0170] includes 1.

 

This means that p-value shows that they are significantly associated while the 95% CI does not indicate that.

 

My question is that based on the output from SAS, what should I use?

 

Below is the code I used:

Proc freq data=final;
	Table var1* var2 / fisher or;
Run;
2 REPLIES 2
Rick_SAS
SAS Super FREQ

Please post the results of the Fisher's Exact Test and Odds Ratio tables. In particular, I am curious about the size of your sample, I am guessing that you have a small sample.

 

Strictly speaking, what you describe is possible, but probably rare. Fisher's exact test is an exact p-value based on a combinatorial computation. It is most often used for small samples. The OR and RR results are asymptotic results. For small samples, they can deviate from the exact computation. The sampling distribution in small samples might not be well-approximated by the asymptotic distribution that is used to compute the p-value.

 

Regarding "what to use," use the exact test. However, IMHO a wiser course of action would be to collect more data.

trungdungtran
Obsidian | Level 7

@Rick_SAS: Thank you for your reply and sorry for a late response from me.

 

I agree with you that I have a small sample size as the contingency table is matrix(data=c(17, 31, 5, 1), nrow=2, ncol=2, byrow=FALSE).

 

However, the numbers in my first post are the exact number rather than asymptotic approximation.

 

As you see that I take p-value from the first table (last row) and the exact confidence limits from the last two rows of the last table (see attachment please). They are all exact as I understand correctly from the output of SAS.

 

Please see here an article talking about this problem.

https://academic.oup.com/biostatistics/article/11/2/373/267728

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 5749 views
  • 0 likes
  • 2 in conversation