I am currently learning how to analyse micro array data and I am having problems designing a matrix for paired anova using limma.
The experiment consists in 4 animals. From each animal, 4 cell cultures where prepared. Each cell culture was treated with 4 conditions.
animalCulture <- c(rep("A1", 4), rep("A2", 4), rep("A3", 4), rep("A4", 4)) treatm <- rep(c("Cond1", "Cond2", "Cond3", "Cond4"), 4) df <- data.frame(animalCulture = animalCulture, treatm = treatm)
To construct a model matrix, I was thinking blocking by the
model.ma <- model.matrix(~0+df$animalCulture+df$treatm)
Then variances and contrasts will be defined as follow:
fit <- lmFit(eset, model.ma) contrastmatrix <- makeContrasts(Cond1-Cond2, Cond1-Cond3, Cond1-Cond4, Cond2-Cond3, Cond2-Cond4, cond3-Cond4, levels=model.ma) fit2 <- contrasts.fit(fit, contrastmatrix) ebayes <- eBayes(fit2)
Is this the correct way to model the experimental design?
Is this the correct way to extract contrasts between conditions accounting for samples that comefrom the same animal?
The output of the model moatrix excludes the Cond1. What is the statistical meaning of this?
Thanks for the help