BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
zihdonv19
Quartz | Level 8

I want to fit a model below, where edu is a 3-level variable, cou is a binary variable:

proc genmod data=cohort descending;
class id edu (ref='1');
model cou=edu female / dist=poisson link=log;
repeated subject=id/type=ind;
estimate 'edu 2 vs. edu 1' edu 0 1 0;
estimate 'edu 3 vs. edu 1' edu 0 0 1;
ods output Estimates=outtab;
run;

 But the results viewer showed "Non-est" in the contrast estimate results table. I found people always refer to this note (https://support.sas.com/kb/24/447.html) for relevant questions, but I felt so lost after reading this. 

 

I just want to know:

edu 3 vs. edu 1, RR=....95%CI=...

edu 2vs. edu 1, RR=....95%CI=...

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User
Check this:
http://support.sas.com/kb/24/188.html

I guessed you should code something like:

proc genmod data=cohort descending;
class id edu ;
model cou=edu female / dist=poisson link=log;
repeated subject=id/type=ind;
estimate 'edu 2 vs. edu 1' edu -1 1 0 /cl ;
estimate 'edu 3 vs. edu 1' edu -1 0 1;
ods output Estimates=outtab;
run;

Check :
https://support.sas.com/kb/24/447.html

View solution in original post

2 REPLIES 2
PaigeMiller
Diamond | Level 26

Use the LSMEANS command in PROC GENMOD, with the DIFF and CL options. https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_genmod_syntax20.htm

--
Paige Miller
Ksharp
Super User
Check this:
http://support.sas.com/kb/24/188.html

I guessed you should code something like:

proc genmod data=cohort descending;
class id edu ;
model cou=edu female / dist=poisson link=log;
repeated subject=id/type=ind;
estimate 'edu 2 vs. edu 1' edu -1 1 0 /cl ;
estimate 'edu 3 vs. edu 1' edu -1 0 1;
ods output Estimates=outtab;
run;

Check :
https://support.sas.com/kb/24/447.html

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

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1192 views
  • 2 likes
  • 3 in conversation