Kai Lawson-McDowall
01/27/2026, 5:14 PM## grp ind cnd ind.n
## 1 X 1 A 1
## 2 X 1 B 1
## 3 X 2 A 2
## 4 X 2 B 2
## 5 X 3 A 3
## 6 X 3 B 3
## 7 Y 4 A 1
## 8 Y 4 B 1
## 9 Y 5 A 2
## 10 Y 5 B 2
## 11 Y 6 A 3
## 12 Y 6 B 3
From the documentation, this suggests the model can be:
counts ~ grp + grp:ind.n + grp:cnd
However, I'm failing to see how we can translate interaction terms into the samplesheet and contrasts?
The closest that I can think of/manage is that we can instead have a column grp_ind
that acts to combine the `grp`and ind columns (as they are linearly related)
## grp ind cnd individual_and_group
## 1 X 1 A X_1
## 2 X 1 B X_1
## 3 X 2 A X_2
## 4 X 2 B X_2
## 5 X 3 A X_3
## 6 X 3 B X_3
## 7 Y 4 A Y_4
## 8 Y 4 B Y_4
## 9 Y 5 A Y_5
## 10 Y 5 B Y_5
## 11 Y 6 A Y_6
## 12 Y 6 B Y_6
As far as I can tell, with the pipeline, we can only model A vs B within each group (X and Y) accounting for patient, and then have to do I have to the group-specific condition effects outside the pipeline?
My contrasts file would therefore, from what I can tell, look like:
id,variable,reference,target,blocking,exclude_samples_col,exclude_samples_values
X_cnd_B_vs_A,cnd,A,B,ind_grp,grp,Y
Y_cnd_B_vs_A,cnd,A,B,ind_grp,grp,X
where the first row is looking at A vs B only in group X, accounting for patient ID. and the second row is the same except for group Y?
Hopefully what I've laid out above makes sense and I hope I haven't made an incredibly obvious blunder, thanks in advance šJonathan Manning
01/27/2026, 5:23 PMKai Lawson-McDowall
01/27/2026, 5:25 PMGregor Sturm
02/02/2026, 7:14 AM~ condition + (1 | patient) + (1 | group), but there's probably more info on modelling in the dream tutorial.
We did fix some issues with DREAM since December, so if you could give it another try and report back that would be great!Kai Lawson-McDowall
02/02/2026, 4:17 PMKai Lawson-McDowall
02/03/2026, 11:54 AMJonathan Manning
02/03/2026, 11:56 AMKai Lawson-McDowall
02/03/2026, 11:58 AM