BookmarkSubscribeRSS Feed
u41125093
Calcite | Level 5

I'm getting an error message when trying to make a referent variable, not sure if it's to do with how i've labelled the categories or an issues with the ref statement. Any help would be appreciated, thanks team. 

 

PROC FORMAT;
VALUE BMIgfmt
1="Underweight/Normal"
2="Overweight"
3="Obese";
RUN;


PROC GLM DATA=bpdata2 PLOTS=diagnostics;
CLASS bmig (REF= 'Underweight/Normal');
MODEL DBP= age smokgp BMIg / SOLUTION CLPARM TOLERANCE;
RUN;

 

ERROR: Invalid reference value for BMIg.

2 REPLIES 2
andreas_lds
Jade | Level 19

I am not familiar with proc glm, but i would expect that i had to use the unformatted value. And, by the way, where do you assign the format to bmig?

data_null__
Jade | Level 19

You don't appear to have associated the format with the variable.

 

 

format BMIG BMIgfmt.;

Also shouldn't SMOKGP also be in CLASS statement.

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 853 views
  • 1 like
  • 3 in conversation