Entering edit mode
8.5 years ago
hakimelakhrass
▴
80
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.
Try reading the Limma users guide section 9.4.1 for paired model designs, it'll give you some worked examples to look at.
I did do that. My example is based on that section. They only had one example though.
Could you edit your definition of time so that it compiles, please:
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.
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.
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?