we are currently analysing RRBS data in our lab, making use of the BiSeq package. Thank you for providing us with this useful package. We had some questions related to advanced modelling options for the betaRegression step.
In our case we have 3 treatment groups and 2 time points.
We found out that the betaRegression function seems to always compare the first two levels of the factor variable given in the formula, correct?
We also assumed that level1 is compared to level2 (i.e. methdiff = average for samples in group level1 - average for samples in group level2), also correct? (This would be different from the most common procedures to compare other levels to the first, or reference, level. It leads to the same results, as long as we are sure in which order groups are compared).
(i) In order to compare two groups other than the ones associated to the first two levels in the given factor variable, we simply relevel the factor variable to make two other levels the first two. However, we wondered: could this not be done without changing the factor variable? Is there no options to specify which levels to compare?
(ii) In case we need more complicated comparisons, e.g. a contrast comparing the time effect of one treatment corrected for that of another (treatment2_late vs treatment2_early corrected for treatment1_late vs treatment1_early), can this be done? Can we specify contrasts of interest?
(iii) In case we have paired analyses, is it possible to take this into account. I guess it can be done by adding a fixed effect term representing the, say, individual. Are there also options for including random effects?
Thank you in advance!