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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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