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

Hi.  Good evening.

 

I forgot how to do this.  But I want to save coding time and do an ANOVA for many variables against one variable (dependent one) .

 

My code is:

 

proc anova data=aung.initial_complete6; ; *p=.0406;
class m_zmed_combo_id_use ;
model(bmi age_initial)= m_zmed_combo_id_use;
means m_zmed_combo_id_use/bonferonni ;
run; quit;

 

I wish to do bmi, age, etc all in one step.  

 

Any help?  

 

Thanks so much,

grzyb

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

You've almost got it correct. Eliminate the parentheses and use the BON option. Here is a working example:

 

proc anova data=sashelp.heart;
   class Smoking_Status;
   model Cholesterol Weight Systolic Diastolic= Smoking_Status;
   means Smoking_status / bon;
run; quit;

View solution in original post

4 REPLIES 4
data_null__
Jade | Level 19
Get rid of () and just list the variables. You might want to look at the documentation.
Rick_SAS
SAS Super FREQ

You've almost got it correct. Eliminate the parentheses and use the BON option. Here is a working example:

 

proc anova data=sashelp.heart;
   class Smoking_Status;
   model Cholesterol Weight Systolic Diastolic= Smoking_Status;
   means Smoking_status / bon;
run; quit;
mgrzyb
Quartz | Level 8

Thank you, kindly~~

 

Sometimes when in a rush, I, like others, make silly mistakes, esp. after programming for 10 hours.  

 

Thank you very much!!

mgrzyb
Quartz | Level 8
Thank you again!! Happy NYs!!

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