Hi all I have an experiment where I would like to do a 2x2 design for experiment with two conditions. Knockdown of the pk gene with or without serum. What I would like to find out are genes with main effect of pk knockdown, main effect of serum and interaction. My target table looks something like this.
sample gene condition
1 control serum
2 pk_minus serum
15 control serum_minus
16 pk_minus serum_minus
I found a tutorial online and tried to replicated as such.
ft <- paste(targetst$condition,targetst$gene,sep="")
ft <- factor(ft)
design2 <- model.matrix(~0+ft)
colnames(design2) <- levels(ft)
cont.matrix <- makeContrasts(
no_serum = "serum_minuspk_minus-serum_minuscontrol",
Interaction="(serumpk_minus-serum_minuspk_minus) - (serumshcontrol-serum_minuscontrol)"
fit <- lmFit(data, design2)
fit2 <- contrasts.fit(fit, cont.matrix)
fit2 <- eBayes(fit2)
With this is it correct to assume that coef 5 is the interaction? What if I wanted a main effect of serum?
Would it be better if I just do a 2-way ANOVA instead? thanks in advance.