2

I have data from an experiment including 5 biological replicates, each of which has 3 technical replicates. These 5 samples are divided into 2 groups (condition a and contidion b). My goal is to test wether dv of samples in condition a is different to dv of samples in condition b or not.

Here follows the design matrix (dt).

   sample replicate condition        dv
1       1         1         a 1.3736170
2       1         2         a 0.8432886
3       1         3         a 1.4026123
4       2         1         a 0.5778786
5       2         2         a 0.9767180
6       2         3         a 0.5853707
7       3         1         b 0.9844947
8       3         2         b 1.0369401
9       3         3         b 1.0300460
10      4         1         b 1.4529099
11      4         2         b 1.0600300
12      4         3         b 0.9304093
13      5         1         b 1.3188977
14      5         2         b 1.2196227
15      5         3         b 1.0311674

What I would normally do is to take the average dv of technical replicates in each sample (dt.mean) and then perform an ANOVA test between samples in condition a and samples in condition b as follows.

  sample condition   mean_dv
1      1         a 1.2065060
2      2         a 0.7133224
3      3         b 1.0171603
4      4         b 1.1477831
5      5         b 1.1898959

anova(lm(mean_dv~condition, data=dt.mean))

I was wondering wether mixed models could allow me to test similar hypothesis without aggregation of technical replicates. As far as I understood, my approach would be to fit two linear mixed models (with or without condition as fixed effect) and then compare them with ANOVA:

mod0 <- lmer(data = dt, dv ~ (1|sample))
mod1 <- lmer(data = dt, dv ~ condition + (1|sample))
anova(mod0, mod1)

Is this a correct work-flow and does it apply to this problem?
Does it work when testing for between samples factors with replicates?

I already found similar questions, but with slightly different experimental desings in which each sample was tested in both conditions (a and b) like this one.

EDIT
For anyone interest in the answer, I finally found a nice reference book. Under the chapter 6.2 it shows a similar example to the one I reported. It explains how it is possible to test for a between-subjects factor in presence of pseudo-replication (which is my case).

sokha
  • 21
  • 3
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 01 '21 at 08:58
  • Which part in the linked [answer](https://stats.stackexchange.com/a/352884/176202) remains unanswered for your question? – Frans Rodenburg Sep 01 '21 at 09:58
  • Hi Frans! In the linked question each biological sample was measured under both conditions ("control" and "treatment"). As far as I understood, this can be treated as a **repeated measures** problem. In my case, I don't have repeated measures (biological samples are divided into two groups), and I was wondering wether proposed workflow still applies. Moreover, I am interested in understanding the detailed advantages over technical replicates aggregation. – sokha Sep 01 '21 at 10:09

0 Answers0