BookmarkSubscribeRSS Feed
Miracle
Barite | Level 11

Dear All,
Could you please to point out what have I done wrong given the following errors? 

Thanking you in advance.

ERROR: Required operator not found in expression: &sub eq
ERROR: The macro REPEAT will stop executing.

ods output LSMeans=LSM_all_&param
SliceDiffs=SDiff_all_&param;
proc mixed data=inds;
%if &sub ne %then by &byvar;
where PARNAM1C="&param" and 1<=vis<=13;
class id resp tx sex vis / ref=first;
model chg=resp tx sex resp*vis / s ddfm=kenwardroger;
lsmeans resp*vis / cl;
repeated vis / subject=id type=&cov;
slice resp*VIS / sliceby=vis pdiff cl;
run;
ods output close;
1 REPLY 1
PaigeMiller
Diamond | Level 26

Macro variable &SUB does not exist. You also need two semi-colons on this line:

 

%if &sub ne %then by &byvar;;

One ends the %IF and one ends the BY

 

From now on, if you hare having problems with MACRO code, please use 

 

options mprint symbogen mlogic;

at the start of your program.


From now on, do not show us parts of the log disconnected from the code. Show us the LOG from PROC MIXED (or whatever PROC you are using) including the code and ERRORs/WARNINGs in the order they appear in the LOG, without modification, and without you selecting certain parts of the log of PROC MIXED (or whatever PROC you are using) to show us and not showing us other parts.

 

 

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

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
  • 1 reply
  • 305 views
  • 1 like
  • 2 in conversation