I can't work out if I should be using 2 or 3 factors here.
- I have two groups: CON and TEST
- I gave Drug A or Drug B (there is no "None" group...)
- I take samples before treatment and after treatment (before and after) (so technically the "before" = "None")
Consequently:
If I do 2 x 2 (Group x Drug) analysis, then I can investigate the effects of group, but I won't know which drug is having an effect if there is an effect of drug.
If I do a 2 x 2 x 2 (Group x Drug x Time) analysis, I worry that drug and time aren't independent.
I want to know if there is an effect of group, an effect of either drug, and specifically an effect of Drug B and if there are any interactions. Would it be more sensible to do a 2 x 2 and then a post-hoc test in this case?
In practice I am using a mixed effects model with "Sample ID" as a random effect to account for the repeated sampling (before and after).
fit <- nlme::lme(Measurement ~ Group*Drug, random = ~1|SampleID, method="REML", data = data.df)
Edit: I've created an example df to see the groups
Drug Group Time SampleID Measurement
<fct> <fct> <fct> <int> <int>
1 A Con Before 1 3
2 A Con After 1 5
3 A Con Before 2 5
4 A Con After 2 1
5 A Test Before 3 5
6 A Test After 3 4
7 A Test Before 4 1
8 A Test After 4 4
9 B Con Before 5 2
10 B Con After 5 2
11 B Con Before 6 5
12 B Con After 6 3
13 B Test Before 7 3
14 B Test After 7 3
15 B Test Before 8 4
16 B Test After 8 1