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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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