Design Matrix for Limma
0
0
Entering edit mode
8.5 years ago

So I am trying to make a design matrix for limma. I need to make sure it is a paired analysis because it is time series data. How ever I am not sure I am doing it right.

filenames <- row.names(pData(rawData))
person <- factor(c((seq(1,13, by=1)),seq(1,14,by=1),seq(1,14,by=1)
                   ,seq(1,14,by=1),Filter(function(x) x != 8 & x != 9, 1:14)))

time <- factor(c( rep.int(1, 13)),rep.int(2,14),rep.int(3,14)
                 ,rep.int(4,14),rep.int(5,12)))

design <- model.matrix(~0 + person + time )
rownames(design)<- filenames

This is the matrix I make. I input into the model and my probelist is super long and does not look right. I want to compare between the 5 times points but at the same time take into account the that they are the same person. Any help?

Thanks.

R Limma Microarray Affymetrix • 3.0k views
ADD COMMENT
0
Entering edit mode

Try reading the Limma users guide section 9.4.1 for paired model designs, it'll give you some worked examples to look at.

ADD REPLY
0
Entering edit mode

I did do that. My example is based on that section. They only had one example though.

ADD REPLY
0
Entering edit mode

Could you edit your definition of time so that it compiles, please:

time <- factor( c( rep.int(1,13), rep.int(2,14), rep.int(3,14),
              rep.int(4,14), rep.int(5,12)))

I was wondering why you are using time as a factor. Rather than trying to perform contrasts at each time point, I'd try and find time-related trends using polynomial regression.

ADD REPLY
0
Entering edit mode

This appears to be a rendering bug in biostars. Everything renders correctly in the preview but not the final page. I'll play around with things until they render in the final version in a valid manner.

ADD REPLY
0
Entering edit mode

That is just how I saw it being done. To make a contrast matrix and try to see the differences. Do you have any tutorials or R packages in using polynomial regression for this?

ADD REPLY

Login before adding your answer.

Traffic: 2288 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