Detecting Random & Crossed Random-Effects from Model Syntax in R (lme4) I'm following-up on this question, and inspired by this great answer. I have 3 lme4 longitudinal mixed-models. Throughout, y is the response variable, group is a binary indicator for "control" vs. "treatment",  therapist (a clustering indicator), subjects (a clustering indicator), and time is the measurement time indicator (e.g., 0, 1, 2, 3).

Question: Suppose each model syntax below, as well as the data structure used to fit them, precisely represent the study design by a researcher, THEN: In each model, can we determine which random effects are taken as NESTED and which one(s) as CROSSED?

# FIRST:
lmer(y ~ time * group + 
                (time | therapist:subjects) +
                (time * group || therapist), 
                 data = data)

# SECOND:
lmer(y ~ time * group + 
                (time | therapist:subjects) +
                (time | therapist) +
                (0 + group + time:group | therapist), 
                 data = data)

# THIRD:
lmer(y ~ time * group + 
                (1 | therapist:subjects) +  
                (0 + time | therapist:subjects) +
                (0 + time:group | therapist) + 
                (0 + group | therapist),
                 data = data)

 A: 
Question: Suppose each model syntax below, as well as the data structure used to fit them, precisely represent the study design by a researcher, THEN: In each model, can we determine which random effects are taken as NESTED and which one(s) as CROSSED?

Clarified in the comments:

So, I'm asking how could one understand the nature (i.e., crossed vs. nested) such random-effects by examining the model syntax used to fit them.

No. There is no way to determine whether factors are nested by inspecting the formula. This is because nesting and crossing are properties of the study design, not the model.
If we use:
(1 | therapist) + (1 | therapist:subject)

then the intention is often to specify that subject is nested in therapist.
However, if the reality of the study design is that subject is crossed with therapist, then this model would be incorrect. The model cannot tell us whether the factors or nested or crossed.
If we write:
(1 | therapist) + (1 | subject)

then there can be ambiguity because the results will depend on how the data are encoded. There are two scenarios:

*

*the factors are actually crossed


*the factors are actually nested
In the former case then (1 | therapist) + (1 | subject) is correct. We can of course still fit (1 | therapist) + (1 | therapist:subject) however this would be wrong. Note that the model formula cannot tell us whether the factors are nested or crossed.
In the latter case, it depends on how the data are encoded. For example, suppose we have 3 therapists, each of whom sees 3 subjects, and each subject is unique. So there are 9 unique subjects. If these are coded like this:
     subject therapist
1       1         1
2       2         1
3       3         1
4       1         2
5       2         2
6       3         2
7       1         3
8       2         3
9       3         3

here subject is encoded such thateach therapist "shares" the same subject ID numbers, even though they are different individuals. So here we can see that even looking at the data, there is no way to know whether these factors are crossed or nested - the only way to know is with reference to the study design. Obviously it follows that if the data cannot tell us whether the factors are crossed or nested, then the model formulae also cannot. In this case (1 | therapist) + (1 | subject) is incorrect, and (1 | therapist) + (1 | therapist:subject) should be used.
If subject is coded like this:
     subject therapist
1       1         1
2       2         1
3       3         1
4       4         2
5       5         2
6       6         2
7       7         3
8       8         3
9       9         3

then (1 | therapist) + (1 | subject) and (1 | therapist) + (1 | therapist:subject) will yield exactly the same results. Again, the model formulae cannot inform us about whether the factors are nested or crossed.
