BookmarkSubscribeRSS Feed
JLang055
Fluorite | Level 6

Hello,

 

I have a 4 by 2 frequency table:

BMI groupscat 1cat 2
underweight1.41.6
normal67.271.2
overweight23.721.6
obese7.75.6

 

Is there a way to obtain a p-value for significant difference for each BMI group when comparing cat 1 vs cat 2?

 

Thank you,

Justin

2 REPLIES 2
Ksharp
Super User
Your data is not COUNT data. I suppose just to use ANOVA ?


data have;
infile cards expandtabs;
input BMI  : $40. cat1 cat2;
cards;
underweight 1.4 1.6
normal 67.2 71.2
overweight 23.7 21.6
obese 7.7 5.6
;
data temp;
 set have;
 cat='cat1';v=cat1;output;
 cat='cat2';v=cat2;output;
 drop cat1 cat2;
run;
proc glm data=temp;
class bmi cat;
model v=bmi cat/solution;
quit;

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 452 views
  • 1 like
  • 3 in conversation