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_¶m
SliceDiffs=SDiff_all_¶m;
proc mixed data=inds;
%if &sub ne %then by &byvar;
where PARNAM1C="¶m" 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;
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.