Paired t-test or Mixed Model for same subjects receiving 2 treatments A and B with multiple measurements per subject

Dear Experts

I am measuring a property of 24 subjects using two different tools A and B. I’ve made 5 measurements with A and 5 measurements with B, on the same subject .

  • Independent variables: Tool used (A or B)
  • Dependent variable: The property measured 5 times for A and 5 times for B for the same subject.

To compare means, is it OK to aggregate the 5 measurements per subject per tool into one mean per subject per tool and then perform paired t-test OR should I use mixed models. I also noted that mixed model using a function such as lmer() from R package lme4 does not take into consideration that A and B are performed on SAME subjects.


I am not an expert in mixed effects models, though I have used the older lme() function in the nlme R package for various analyses.

That being said, three comments:

  1. I would not collapse multiple measurements per tool per subject into a single aggregate measure. You lose the per subject assessment of variability that you want to know about for each of the two tools being used. That is presumably why you are taking multiple measurements, right? Not only is there a presumptive difference between the two tools that may be relevant, but the within subject variability may be quite different between the two tools as well.

  2. Since you are going to use R, and software specific questions tend to be off-topic here, I would recommend that you post your query to the r-sig-mixed-models group, which is a focused audience in this domain:

  1. I would disagree with your assessment of lmer() not being able to handle clustered measurements on the same subject as a random effect. This can be done with the older lme() function, and lmer() provides far more functionality. The particular specification for that type of model in lmer() is something that the above list folks can provide to you, based upon further interaction on the list.

Lastly, if you are looking to assess the agreement between the two tools, and not just whether the mean measurements are different, you may want to look at the Bland-Altman approaches as well:

including this paper, which is linked on their site:


Thanks a lot dear.

Just a quick update regarding lmer() function. @MSchwartz : You are correct, Sir. paired data can be accounted for if the data to be processed by the function accounts for paired design.


Again, thanks a lot for your support