BookmarkSubscribeRSS Feed
MarthaAnne
Calcite | Level 5
I'm working in an OpenVMS batch environment which is still running SAS v8.2. In this version, PROC GENMOD does have a CLASS statement, but this statement doesn't have any options. So I can't specify reference values for the covariates with, for example, (ref='a'). I've been unable to find anything in the v8 documentation explaining what SAS uses for reference values for binary, continuous, or categorical covariates. Does anyone know?

Before you suggest it, upgrading is not an option. Also, I'm not a statistician, I just play one at work. So go easy on the jargon.

Thanks!
2 REPLIES 2
MattF
Calcite | Level 5
Hi:

A time-honored approach is to use formats - with the default descending order, a prefix of "z." on your desired category will force it to be last in the sort order, hence the base class (assuming 0/1 design matrix coding).


/*default "M" is base class */
proc genmod data=sashelp.class;
class sex;
model height = age sex;
run;

/* forcing "F" to be the base class */
proc format;
value $sex
"F" = "z.F"
;
run;

proc genmod data=sashelp.class;
class sex;
model height = age sex;
format sex $sex.;
run;

Best regards,
-Matt
MarthaAnne
Calcite | Level 5
Matt,
Thanks for the quick response. My question was even more basic, but I think you answered by implication. Can I assume that SAS sorts formatted values alphabetically and then uses the last one as the reference? Is this true for all variable types (binary, numeric, character)?
-- mc

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

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
  • 2 replies
  • 1896 views
  • 0 likes
  • 2 in conversation