ERROR: There seems to be a problem in the WITHINSUBJECT effect data in PROC GENMOD


When specifying the REPEATED statement including the WITHINSUBJECT= (or WITHIN=) option, if any subject has two or more observations having the same value of the WITHINSUBJECT= effect, then the following error message is issued:

ERROR: There seems to be a problem in the WITHINSUBJECT effect data. Check to see that there are at least as many levels of the WITHINSUBJECT effect as there are measurements for each subject.

Within every subject, the values of the WITHINSUBJECT= effect must be unique so that the measurements within a subject can be properly ordered.