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)
ft
design2 < model.matrix(~0+ft)
colnames(design2) < levels(ft)
design2
cont.matrix < makeContrasts(
pk="serumpk_minusserumcontrol",
pk_minus="serum_minuspk_minusserum_minuscontrol",
serum="serumcontrolserum_minuscontrol",
no_serum = "serum_minuspk_minusserum_minuscontrol",
Interaction="(serumpk_minusserum_minuspk_minus)  (serumshcontrolserum_minuscontrol)"
,levels=design)
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 2way ANOVA instead? thanks in advance.
Ahdee