multi-level design - a simplified question
0
0
Entering edit mode
Rao,Xiayu ▴ 550
@raoxiayu-6003
Last seen 8.8 years ago
United States
Hello all, I do need some help on analyzing such unorganized data. Please help me out. Thank you so much! I basically followed the analysis of multi-level experiments in limma user guide. But I do not feel right about the code below. Please give me some suggestions. # I want to compare Normal vs. Tumor negative, and Normal vs Tumor positive. There are partial pairing (subject) and batch effect (chip). Treat <- factor(paste(targets$chip,targets$type,sep=".")) design <- model.matrix(~0+Treat) colnames(design) <- levels(Treat) corfit <- duplicateCorrelation(y,design,block=targets$subject) corfit$consensus fit <- lmFit(y,design,block=targets$subject,correlation=corfit$consensus) cm <- makeContrasts(TposvsN=(a1.Tpos+a2.Tpos+a3.Tpos)/3-(a1.N+a2.N)/2, TnegvsN=(a1.Tneg+a3.Tneg)/2-(a1.N+a2.N)/2, levels=design) ???? fit2 <- contrasts.fit(fit, cm) fit2 <- eBayes(fit2) topTable(fit2, coef=1, sort.by="p") sample type subject chip s1 Tneg 1 a1 s2 N 1 a1 s3 Tpos 2 a1 s4 N 2 a1 s5 Tneg 3 a1 s6 N 3 a1 s7 Tpos 4 a1 s8 N 4 a1 s9 Tpos 5 a2 s10 N 5 a2 s11 N 6 a2 s12 Tpos 7 a2 s13 N 7 a2 s14 Tpos 8 a2 s15 N 8 a2 s16 Tneg 9 a3 s17 Tneg 10 a3 s18 Tneg 11 a3 s19 Tpos 6 a3 s20 Tpos 12 a3 s21 Tneg 13 a3 s22 Tpos 14 a3 Thanks, Xiayu [[alternative HTML version deleted]]
• 1.1k views
ADD COMMENT

Login before adding your answer.

Traffic: 627 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6