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

Technote (troubleshooting)


Problem(Abstract)

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.

MIXED
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:

GROUP SUBJ TIME
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:

GROUP SUBJ TIME
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

SUBJECT(subj)

to this.

SUBJECT(subj*group)

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.

Historical Number

30610

Rate this page:

(0 users)Average rating

Document information


More support for:

SPSS Statistics

Software version:

Not Applicable

Operating system(s):

Platform Independent

Reference #:

1479744

Modified date:

2014-09-23

Translate my page

Machine Translation

Content navigation