Question: model matrix for longitudinal pairwise data: linear regression or linear mixed model?
0
gravatar for agm123
12 months ago by
agm1230
agm1230 wrote:

Hello,

I am looking for stat expertise to figure out if I have set up my model matrix correctly. I am going to give an example info table that represents my experimental design. I have read the limma and edgeR documentation through and through and cannot find a clear example of this.

DESIGN: 3 individuals with recordings of a treatment at baseline and 3 future time points. baseline is preinfection. timepoints relate to stage in disease progression.

file individual timepoint status 


file <- 1:12
individual <- c(rep(1,4),rep(2,4),rep(3,4)) 
timepoint <- rep(0:4,3) 
status <- rep(c("uninfected",4),rep("infected",8))
df <- cbind(file,individual,timepoint,status)

I am interested in the differential expression at each timepoint with timepoint 0 being baseline.

model.matrix(~individual+timepoint)

model.matrix(timepoint~(1|individual))

The main effect I want to see is the effect between timepoints not individuals- so I understand I can treat the individuals as a random effect in a mixed model. I just am not sure not to correctly integrate multiple independent variables, paired samples, and longitudinal data with baseline measures.

Any help and or explanations would be greatly appreciated!

ADD COMMENTlink written 12 months ago by agm1230

I suggest you post this over at Bioconductor as the maintainers of the tools are active there. If you do so, please use only one tag, either limma OR edgeR or DESeq2 depending on the tool you want to use. It is generally (at BioC, not here at Biostars) bad practice to use multiple tool tags as it will attract all developers and they already have quite a workload given all the questions they receive. If you have no preference, simply do not use a tool tag and only use something like model matrix.

ADD REPLYlink written 12 months ago by ATpoint36k

This is more of a general linear regression stat question that could relate to many different packages- but I did post in BioC with only the limma tag. Thank you for the suggestion.

ADD REPLYlink written 12 months ago by agm1230

Cross-posted as suggested: https://support.bioconductor.org/p/122407/

ADD REPLYlink written 12 months ago by ATpoint36k
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 2.3.0
Traffic: 1212 users visited in the last hour