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.

 

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

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