IBM Support

Warning: The levels of the repeated effect are not different for each observation within a repeated subject

Technote (troubleshooting)


Using SPSS's mixed linear modeling procedure to run a repeated measures ANOVA, I received the following warning:

"The levels of the repeated effect are not different for each observation within a repeated subject. This command is not executed."

Would you please explain what's wrong and how I can correct the problem?

Resolving the problem

The SUBJECT specification on the REPEATED subcommand is used to specify which cases are from the same subject and thus possibly correlated. Any variables specified as REPEATED are used to index different measurements on a subject, with the unique combinations over all cases determining the size of the R matrix. Each subject can have only one value at a given level or combination of levels of variables specified as REPEATED.

Here is an example that will illustrate the problem. Consider the following model.

y BY group time
/FIXED = group time group*time
/REPEATED = time | SUBJECT(subj).

This is a model in which each subject (identified by the variable SUBJ) is assigned to one of two or more groups and the subjects are followed over two time periods. If your data look like this:

1 1 1
1 1 2
1 2 1
1 2 2
1 3 1
1 3 2
2 1 1
2 1 2
2 2 1
2 2 2
2 3 1
2 3 2

you will get the warning. Note that the warning describes the circumstance: The levels of the repeated effect aren't different for each level of subject, because there are cases for which SUBJ = 1 in both groups, and these cases also have the same TIME values. There are also cases for SUBJ = 2 and SUBJ = 3 in both groups. However, one such co-occurrence of subject values for a given level of the repeated factor will trigger the warning.

You will not encounter an error if your data look like this:

1 1 1
1 1 2
1 2 1
1 2 2
1 3 1
1 3 2
2 4 1
2 4 2
2 5 1
2 5 2
2 6 1
2 6 2

because all subjects are uniquely identified so there is no case in which the levels of subject are the same for each level of the repeated effect.

To get around the problem, you don't have to recode the subject variable in the first example. All you need do is change what's in parentheses following the SUBJECT keyword from this


to this.


Now, you would only receive the warning if you had two or more lines in the file that had the same values for GROUP, SUBJ and TIME, instead of just SUBJ and TIME.

In summary, to avoid this warning, either code your data such that subjects are unique or if subjects within groups share numbers, specify both in the SUBJECT specification so that the combinations are unique. An easy way to test whether you meet these criteria and to identify violations if they occur is to use the AGGREGATE procedure, specifying the SUBJECT variable(s) and the REPEATED variable(s) as break variables and adding the count of the number of cases within each break group to the file. In the menus, specify Data>Aggregate. Move any SUBJECT and REPEATED variables into the Break Variable(s) area, check the box labeled Number of Cases and click OK. Scan the newly added N_BREAK variable in your file to identify problems. Any occurrences of numbers greater than 1 in the resulting counts indicate violations of the requirement.

If you have multiple repeated measures factors represented in the data, then these need to be represented in the Repeated box of the "Specify Subjects and Repeated" dialog. For example, suppose that each subject was observed under 2 conditions at each of 3 time points. The data would be comprised of 6 records for each subject with each record representing one combination of
condition and time. Both condition and time should be placed in the Repeated box, even if you
only included one of these factors in the model. If you only included Time in the Repeated box, then each subject would have 2 records with Time=1, 2 records with time=2, etc. The warning described above would appear and MIXED would not run. With both repeated factors included, the combination of repeated factor levels are unique within each subject.

Related information

Need more help? Our Statistics forum is Live!

Historical Number


Document information

More support for: SPSS Statistics

Software version: Not Applicable

Operating system(s): Platform Independent

Reference #: 1479744

Modified date: 07 September 2016

Translate this page: