Hi everybody,

I have a crossover study 2x2 design with 2 treatments and 2 baselines. Each phase consisted of one measurement before treatment (pre or baseline) and one after treatment (post). The data table looks like this:

```
Subject | Sequence | Phase | Treatment | Time
1 AB 1 A pre-baseline
1 AB 1 A post
1 AB 2 B pre-baseline
1 AB 2 B post
2 BA 1 B pre-baseline
2 BA 1 B post
...
```

I'm really not sure about the formula i should use to compare the effect of treatments at final time point (post), controlling for baselines and also for the "Sequence" variable (as my PCA shows distinct separation based on this variable). I went through the vignette but didn't find any example with such a design, does somebody have an idea?

Any help would be greatly appreciated!

Thanks for you reply Michael!

So using

`lm()`

, i would use the following formula:Then, if i'd like to compare treatments at the final time point, i guess I would run something like:

But does "TreatmentB.Timepost" controls for baselines and "Sequence" variable in this case?

Selecting the appropriate statistical design is really on the user, I don't have sufficient time for consult and interpretation on the support site. That is the design I would use for a 2x2 crossover.

Thanks Michael!

I understand you can't advise users on statistical design, but could you tell me if, when using the design described above, the DESeq2 result "TreatmentB.Timepost" will take into account baseline values and "Sequence" covariate?

I’m really busy these days and don’t have time to advise on statistical designs. It’s really a good idea to work with a statistician who can help intercept meaning of coefficients in your design.