BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jack2012
Obsidian | Level 7

Dear ALl,

 

I have question regard to the difference of Gamma in Figure 1 and Figure 2. How to interpret them  and what is the difference?

The other question is why Figure 1 code produce the Odds ratio and Relative risk estimates but not the Figure 2 code?

 

ThanksFigure 1.jpgFigure 2.jpgFigure 3.jpg

/*Figure 1*/
proc freq data=dar_grp5;
   tables Treatment*SWAEVL2C/measures alpha=0.1 CL;
run;
/*Figure 2*/
proc freq data=compare;
   tables SWAEVL2C_gra*SWAEVL2C_syr/measures alpha=0.1 CL;/*SWAEVL2C_gra is the results for granules and SWAEVL2C_Syr is for Syrup*/
run;
1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

The formulas for these statistics are shown in the "Measures of Association" section of the PROC FREQ doc.

For the first TABLES statement:

C = number concordant = 10;

D = number discordant = 10;

Therefore Gamma = (C-D)/(C+D) = 0.

 

For the second TABLES statement:

C = 10;

D = 0;

Gamma = (C-D)/(C+D) = 1.

 

The odds ratio formula is also in the doc.

OR = n11 * n22 / (n12 * n21)

In the second run, the off diagonal counts are zero. therefore the odds ratio is undefined.

The RR computation is similar, and also undefined in the second situation.

 

View solution in original post

3 REPLIES 3
Rick_SAS
SAS Super FREQ

The formulas for these statistics are shown in the "Measures of Association" section of the PROC FREQ doc.

For the first TABLES statement:

C = number concordant = 10;

D = number discordant = 10;

Therefore Gamma = (C-D)/(C+D) = 0.

 

For the second TABLES statement:

C = 10;

D = 0;

Gamma = (C-D)/(C+D) = 1.

 

The odds ratio formula is also in the doc.

OR = n11 * n22 / (n12 * n21)

In the second run, the off diagonal counts are zero. therefore the odds ratio is undefined.

The RR computation is similar, and also undefined in the second situation.

 

Doc_Duke
Rhodochrosite | Level 12

In addition to Rick's comments, the Gamma, OR, and RR, and confidence limits are all based on asymptotic theory, so they should not be used with sample sizes this small.  PROC FREQ has a number of EXACT tests that are more appropriate.

Jack2012
Obsidian | Level 7

Thanks for your comment. I fully agree.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 3 replies
  • 1949 views
  • 4 likes
  • 3 in conversation