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

Hello,

I used the following code to estimate the difference between the case and the control in matched data, but I would like to have the exponential of the difference and its 95% confidence interval? Is there an option in genmod or gee that would allow me to do this?
Then I also need to estimate the exponential of the difference and its confidence interval adjusted for other variables.

 

proc genmod data=tab;
class paired group;
model cci=group/ dist=negbin link=log type3 cl ;
repeated subject=paired/ type=ind;
lsmeans group/ diff exp;
run;

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

I assume that what you mean is that you want the difference in the group means which is not what the DIFF option in the LSMEANS statement gives you. If you add the ILINK and CL options in the LSMEANS statement, Mean and confidence limits  columns will be added in the LS-means table showing the individual group means and confidence intervals on the response. But the estimates in the LS-means differences table are differences of log means (or log ratios of means) and the values in the Exponentiated columns are ratios of means. To get estimated differences of means and confidence limits on the differences, use the NLMeans macro. See Example 1 in the Results tab of the macro documentation.

View solution in original post

1 REPLY 1
StatDave
SAS Super FREQ

I assume that what you mean is that you want the difference in the group means which is not what the DIFF option in the LSMEANS statement gives you. If you add the ILINK and CL options in the LSMEANS statement, Mean and confidence limits  columns will be added in the LS-means table showing the individual group means and confidence intervals on the response. But the estimates in the LS-means differences table are differences of log means (or log ratios of means) and the values in the Exponentiated columns are ratios of means. To get estimated differences of means and confidence limits on the differences, use the NLMeans macro. See Example 1 in the Results tab of the macro documentation.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of 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
  • 1 reply
  • 673 views
  • 4 likes
  • 2 in conversation