Question: LIMMA 2x2 with time
0
gravatar for Ahdee
2.0 years ago by
Ahdee40
United States
Ahdee40 wrote:

Hi can someone take a look at this and see if my design is correct?  What I'm trying to achieve is similar to a 2-way ANOVA main effect and interactions with LIMMA.  

I would like to look at the main effect of gene, time and interaction as well as comparison of gene regardless of time. Sorry if this has been asked before, but  I was hoping to get some confirmation.  

thanks!

ds <- read.table(header = TRUE, text =
                 "id gene time
                   1 gfp t24
                  2 ko   t24
                  3 gfp t75
                  4 ko t75
                 ")

ft <- paste(ds$time,ds$gene,sep=".")

ft <- factor(ft)
ft
design2 <- model.matrix(~0+ft)
colnames(design2) <- levels(ft)
design2

cont.matrix <- makeContrasts(
  gene.main = "(t24.ko + t75.ko)/2 - (t24.gfp + t75.gfp)/2", 
  time.main = "(t75.gfp + t75.ko)  /2  - (  t24.gfp +  t24.ko) /2 ",
  Interaction="(t24.ko - t75.ko) - (t24.gfp - t75.gfp)",
  gfp.vs.ko = " (t24.ko + t75.ko) - (t24.gfp + t75.gfp) "

  ,levels=design2)

 

 

 

limma limma design matrix • 324 views
ADD COMMENTlink modified 2.0 years ago by James W. MacDonald50k • written 2.0 years ago by Ahdee40
Answer: LIMMA 2x2 with time
0
gravatar for James W. MacDonald
2.0 years ago by
United States
James W. MacDonald50k wrote:

You need to divide by two for the last contrast as well, but otherwise seems ok to me. Plus I don't think you want to use quotes

ADD COMMENTlink written 2.0 years ago by James W. MacDonald50k

Thanks James! After reading over you comment I just realized that what I want is indeed the same as the main effect for gene.main.  great thanks again. 

 

ADD REPLYlink written 2.0 years ago by Ahdee40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 284 users visited in the last hour