# Mixed factor both “within” and “between” subjects

I am wondering about experimental designs in which the levels of a factor are partly within and partly between subjects.

Assume for concreteness that the experiment is as follows:

• The response variable is speed of toe nail growth
• three groups of subjects: patients with a vascular intervention in the left / right leg, and controls without an intervention. This is coded as a 3-level between subject factor $\texttt{group}$={left, right, control}.
• Measurements are taken on both the left and right foot, coded as a 2-level within-subject factor $\texttt{side}$={left, right}.

In this form, the experiment is easy to analyze and one would expect considerable interactions between the two factors

The main hypotheses, however, concern changes in the speed of toe nail growth on the side that received the intervention, and it seems reasonable to recode the factors as follows:

• $\texttt{side}$={left, right} as before
• $\texttt{relside}$={same, other, healthy}, depending on whether the measurement was taken on a leg that received the intervention, on the leg whose bearer received the intervention on the other side, or on a control subject.

In this formulation, interactions are likely to be smaller and any effects of $\texttt{relside}$ would lend themselves to meaningful interpretations.

However, this new factor $\texttt{relside}$ now appears to be both within- and between-subjects in the sense that its first two levels {same, other} can and do occur in the same subject, but combinations like {same, healthy} cannot occur within a subject.

Is such a recoding of factors helpful for the analysis of an experiment of the kind described and how would one go about it? I am familiar with most approaches to analyzing repeated measures experiments in R.

Would it, alternatively, be more natural to employ a clustered / hierarchical / multilevel design with factors $\texttt{side}$={left,right}, $\texttt{group}$={patient, control} and a third factor $\texttt{interventionside}$={left,right} inside the level patient? Where can I read about analyzing such designs?