Hi all,
I’m working with longitudinal data but I am not sure which is the best way to analyse this type of data using limma.
I have the blood methylation data from 24 individuals evaluated at the baseline and after 3 years of follow up. All 24 subjects were healthy at the baseline and all developed the disease after the follow-up.
I would like to compare the methylation values between these two time-points. However, I don’t know how to construct the model considering that I’m comparing the same individuals in two different moments.
I have two variables:
1) Time (baseline or follow-up);
2) Subjects (identifying the different measures for the same sample)
How is the best way to construct the model.matrix and the lmfit?
Any help would be greatly appreciated.
Thanks!
Firstly, reply to answers using "add comment", not "add answer", unless you're answering your own question.
Secondly,
duplicateCorrelation()
is intended for situations where you want to compare across blocking levels, e.g., across subjects (presumably in different conditions). In such cases, blocking in the design matrix would not be appropriate, as the block effect would be indistinguishable from the effect of condition. Of course, this discussion is mostly academic because in your case, you are comparing within subjects, so Ryan's suggestion is perfectly suitable.Ok. Thank you Aaron.