Question: How is the best way to construct the model.matrix and the lmfit comparing longitudinal data?
0
gravatar for leticia.n.spindola
20 months ago by
leticia.n.spindola0 wrote:

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!

ADD COMMENTlink modified 20 months ago • written 20 months ago by leticia.n.spindola0
Answer: How is the best way to construct the model.matrix and the lmfit comparing longit
1
gravatar for Ryan C. Thompson
20 months ago by
The Scripps Research Institute, La Jolla, CA
Ryan C. Thompson7.4k wrote:

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 COMMENTlink modified 20 months ago • written 20 months ago by Ryan C. Thompson7.4k
Answer: How is the best way to construct the model.matrix and the lmfit comparing longit
0
gravatar for leticia.n.spindola
20 months ago by
leticia.n.spindola0 wrote:

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 COMMENTlink written 20 months ago by leticia.n.spindola0
1

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 REPLYlink modified 20 months ago • written 20 months ago by Aaron Lun25k

Ok. Thank you Aaron. 

ADD REPLYlink written 19 months ago by leticia.n.spindola0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 244 users visited in the last hour