**40**wrote:

Dear members,

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 `animalCulture`

variable

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

**12k**• written 3.6 years ago by serpalma.v •

**40**

Your

`limma`

tag is misspelt, so people who could answer you won't see this post. Also, the markdown stuff doesn't work here, so you have to format code using the options in the post editor.24k