Thank you. I sorted out the data and tried the test statement but I got a syntax error message. Is there any way to fix it? or any other suggestions? Here is the code I used. (I think you meant I need to dummy variables manually and use the test?, here is the reference, https://stats.oarc.ucla.edu/sas/faq/how-can-i-compare-regression-coefficients-across-three-or-more-groups/ ) data rmst2;
set rmst;
sex_f=.;
sex_m=.;
if Sex='F' then sex_f=1; ELSE sex_f=0;
if Sex='M' then sex_m=1; ELSE sex_m=0;
group_a=.;
group_b=.;
if group='A' then group_a=1;ELSE group_a=0;
if group='B' then group_b=1;ELSE group_b=0;
sfga=sex_f*group_a;
sfgb=sex_f*group_b;
smga=sex_m*group_a;
smgb=sex_m*group_b;
run;
proc rmstreg data=rmst2;
class sex_f sex_m group_a group_b sfga sfgb smga smgb;
model time*status(0) = sex_f sex_m group_a group_b sfga sfgb smga smgb ;
*lsmeans group*Sex/e diff;
test group_a=0,sfga=0 ;
run; Here is the relevant log. 369 proc rmstreg data=rmst2;
NOTE: PROCEDURE RMSTREG used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
NOTE: The SAS System stopped processing this step because of errors.
370 class sex_f sex_m group_a group_b sfga sfgb smga smgb;
371 model time*status(0) = sex_f sex_m group_a group_b sfga sfgb smga smgb ;
372 *lsmeans group*Sex/e diff;
373 test group_a=0,sfga=0 ;
-
22
76
ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, *, -, /, :, @,
_CHARACTER_, _CHAR_, _NUMERIC_, |.
ERROR 76-322: Syntax error, statement will be ignored.
374 run;
... View more