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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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