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.

 

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore Now →
Develop Code with SAS Studio

Get started using SAS Studio to write, run and debug your SAS programs.

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