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

Hi,

 

I'm trying to run a contrast in a GLIMMIX proc, but this error always appears "ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant."

I'm doing a contrast of control X inclusion level 1 X inclusion level 2  and inclusion level 1 X inclusion level 2. Both are in an RCBD design.

 

The code is:

 

Data CONTRAST;
infile datalines dlm="09"x;
input ID block room trtm$ outcome;
datalines;

. . . . .

. . . . .

;
Run;
-----

Proc glimmix data=CONTRAST;
class trtm block room;
model outcome=trtm|room;
title "outcome results";
random block block(room);
contrast "linear" trtm|room 0 -1 1;
contrast "quadratic" trtm|room -2 1 1;
lsmeans room|trtm / pdiff adjust=tukey lines;
covtest "block = 0" 0. . / classical;
covtest "block(room) = 0" .0. / classical;
Run;

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
svh
Lapis Lazuli | Level 10 svh
Lapis Lazuli | Level 10
So the problem is that your terms in the contrast statement are not specified correctly. Instead of using the "pipe", you need to use the asterisk to define the interaction term thusly: trtm*room
Then make sure your effect coding is defined correctly.

View solution in original post

2 REPLIES 2
svh
Lapis Lazuli | Level 10 svh
Lapis Lazuli | Level 10
So the problem is that your terms in the contrast statement are not specified correctly. Instead of using the "pipe", you need to use the asterisk to define the interaction term thusly: trtm*room
Then make sure your effect coding is defined correctly.
apereira
Fluorite | Level 6
Great! It worked.

Thanks

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 386 views
  • 1 like
  • 2 in conversation