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=...
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
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.
Ready to level-up your skills? Choose your own adventure.