Programming the statistical procedures from SAS

How to understand the great difference value of Gamma in PROC FREQ?

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 86
Accepted Solution

How to understand the great difference value of Gamma in PROC FREQ?

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;

Accepted Solutions
Solution
‎08-12-2016 04:07 AM
SAS Super FREQ
Posts: 3,306

Re: How to understand the great difference value of Gamma in PROC 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


All Replies
Solution
‎08-12-2016 04:07 AM
SAS Super FREQ
Posts: 3,306

Re: How to understand the great difference value of Gamma in PROC 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.

 

Valued Guide
Posts: 2,108

Re: How to understand the great difference value of Gamma in PROC FREQ?

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.

Frequent Contributor
Posts: 86

Re: How to understand the great difference value of Gamma in PROC FREQ?

Thanks for your comment. I fully agree.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 208 views
  • 4 likes
  • 3 in conversation