How is the best way to construct the model.matrix and the lmfit comparing longitudinal data?
2
0
Entering edit mode
@leticianspindola-15317
Last seen 6.8 years ago

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!

limma longitudinal data limma paired analysis • 1.3k views
ADD COMMENT
1
Entering edit mode
@ryan-c-thompson-5618
Last seen 10 weeks ago
Icahn School of Medicine at Mount Sinai…

This sounds like a standard paired test design, for which you would generally use a design formula of ~Time + Subject. There are several examples of such designs in the limma User's Guide.

ADD COMMENT
0
Entering edit mode
@leticianspindola-15317
Last seen 6.8 years ago

Thank you for the answer Ryan. I was wondering if it was necessary to use the function duplicateCorrelation(), since I'm investigating the same subjects and I thought that the comparison should be within subject. In which situation should I use this function? 

ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Ok. Thank you Aaron. 

ADD REPLY

Login before adding your answer.

Traffic: 318 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6