I am having problems using these - not sure why. My var Area has six values Area 1 Area 2 Area 3 Area 4 Area 5 Area 6. Area 2 is the reference. I am trying to get Contrast and Test statements to work to test Areas against each other aside from the reference area. I do this code
ODS GRAPHICS ON;
PROC LOGISTIC DATA=SASUSER.PRACTICE2
PLOTS(ONLY)=ALL
;
CLASS CLO (REF='HS') Area (REF="Area 2") / PARAM=REF;
MODEL DDV (Event = '1')=CLO Area Age DQ10
; CONTRAST "Area 4 vs Area 5" Area 0 0 0 1 -1 0/ESTIMATE=BOTH;
TEST Area 4=Area 5;
RUN;
ODS GRAPHICS OFF;
I get an error ERROR 22-322: Syntax error, expecting one of the following: +, ',', -, =.
Where the Test statement is. I assume it is tied to the spaces between the Area and number but that is how the data is in the table. Do I have to recode the table to get rid of the spaces?
A second issue is that in the contrast line I put a coefficient for earch level of Area. I am not sure I did this right.
ODS GRAPHICS ON;
PROC LOGISTIC DATA=SASUSER.PRACTICE2
PLOTS(ONLY)=ALL
;
CLASS CLO (REF='HS') Area (REF="Area 2") / PARAM=REF;
MODEL DDV (Event = '1')=CLO Area Age DQ10
; CONTRAST "Area 4 vs Area 5" Area 0 0 0 1 -1 0/ESTIMATE=BOTH;
TEST Area 4=Area 5;
RUN;
ODS GRAPHICS OFF;
I get an error ERROR 22-322: Syntax error, expecting one of the following: +, ',', -, =.
Where the Test statement is. I assume it is tied to the spaces between the Area and number but that is how the data is in the table. Do I have to recode the table to get rid of the spaces?
A second issue is that in the contrast line I put a coefficient for earch level of Area. I am not sure I did this right.