Hello, guys. I just learned SAS, and I have been puzzled for many days. I hope you can help me.
My data is the number of relapses(Y) in different treatment groups (group=1,2,3) , and I want to compare the difference in the number of relapses in different treatment groups under the least squares mean estimation. I used the lsmeans statement to compare the differences. It outputs the difference of the estimated coefficient(Beta1-Beta3, Beta2-Beta3). But I want to get the differences of Y.
my data is like:
id group relapse_count lntime
1 1 0 -1.108
2 2 1 -0.693
3 3 1 -3.218
4 2 2 -1.108
here is my SAS codes:
proc genmod data=a;
class group(ref="3") id/param=glm;
model relapse_count=group/link=log dist=negbin offset=lntime;
lsmeans group/cl ilink exp ;
estimate '2-1' group -1 1 0/exp;
estimate '1-3' group 1 0 -1/exp;
estimate '2-3' group 0 1 -1/exp;
I would appreciate it if you could help me!
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.