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.
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?
You don't appear to have associated the format with the variable.
format BMIG BMIgfmt.;
Also shouldn't SMOKGP also be in CLASS statement.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.