I have a set of data that I'm having trouble setting up the design.
At time 0, each subject underwent a procedure that generated three regions of samples (groups?); Experimental tissue 1, Experimental tissue 2, and a control tissue. We want to see what happens to the genes at four time points after that. Mostly tissue 1 vs control, but 1v2 and 2vC would also be useful.
One issue is that there's multiple data for each time point and they're all from different subjects. There's from two to five subjects at each time point. There's also baseline data from time point 0 before the procedure that could I suppose be applied to be the baseline of all three experimental groups.
Here is the code I have so far, based off the limma user's guide 9.6
targets <- readTargets("AllTimePointFiles.csv",path=datadir,sep=",",row.names="filename")
data <- ReadAffy(celfile.path=datadir)
eset <- affy::rma(data)
X <- ns(targets$TimeType,df=2) # the number of days since day 0.
Group <- factor(targets$RegionType) # group number, 1, 2, or 3.
design <- model.matrix(~0+Group*X)
fit <- lmFit(eset, design)
fit <- eBayes(fit)
topTableF(fit,number = 29000,adjust="BH")
Even just trying to do region 1 vs control (omitting region 2 from the file), I'm getting every single gene as being significant, wildly so, like 10^-57 to 10^-11.
The other weird thing is that I suspected it was a problem with not setting the coef correctly, but I cannot set the coef to anything. Every single thing I choose, I get an error message
"Error in topTableF(fit, coef = 2, number = 29000, adjust = "BH") :
unused argument (coef = 2)"
Traceback() is no help.
Any help you can give would be greatly appreciated. Thank you.