Limma: nested design: coefficient not estimable ?
1
1
Entering edit mode
F F ▴ 30
@f-f-4077
Last seen 10.6 years ago
Hello, I have a question about nested design and model.matrix in limma (one channel arrays). In this design, each value of variable "source" is nested in (found in combination with only one value of) another variable "type". The interesting contrast is type A vs type B. The complete factorial design is unfortunately not possible to achieve because of biological constraints. Simplest example: > targets<-readTargets("targets.txt") > targets type source 1 A 1 2 A 2 3 B 3 4 B 4 > type<-factor(targets$type) > source<-factor(targets$source) I have tried two ways of model.matrix: 1) > design<-model.matrix(~type/source) 2) > contrasts(type)<-contr.sum(length(levels(type))) > contrasts(source)<-contr.sum(length(levels(source))) > design<-model.matrix(~type/source) In both cases, the coefficients are not estimable for some combination of factors. If I use: > design<-design[,apply(design,2,sum)>0] to remove columns of the design matrix containing all zero (combinations of factors that are not included in the design), there is still one combination for which the coefficients are not estimable (although this combinations does exist). > fit<-lmFit(eset,design) Coefficients not estimable: typeX:sourceY Warning message: Partial NA coefficients for n probe(s) > ebayes<-eBayes(fit) Warning message: In ebayes(fit = fit, proportion = proportion, stdev.coef.lim = stdev.coef.lim) : Estimation of var.prior failed - set to default value I am not sure how to address this issue. Thanks much for your help. [[alternative HTML version deleted]]
limma limma • 1.4k views
ADD COMMENT
0
Entering edit mode
F F ▴ 30
@f-f-4077
Last seen 10.6 years ago
Same question continued, example more detailed/representative of what I am trying to analyze (partially nested, with replicates). Say we are interested in comparing gene expression in yellow versus red fruits, and cannot find red bananas or yellow strawberries etc. > targets sample color fruit 1 1 yellow banana 2 2 yellow banana 3 3 yellow banana 4 4 yellow lemon 5 5 yellow lemon 6 6 yellow lemon 7 7 red cherry 8 8 red cherry 9 9 red cherry 10 10 red strawberry 11 11 red strawberry 12 12 red strawberry Fruit is nested in color, with 3 (biological) replicates for each existing combination of factors. design<-model.matrix(~color/fruit) design<-design[,apply(abs(design),2,sum)!=0] > design (Intercept) coloryellow colorred:fruitcherry coloryellow:fruitlemon 1 1 1 0 0 2 1 1 0 0 3 1 1 0 0 4 1 1 0 1 5 1 1 0 1 6 1 1 0 1 7 1 0 1 0 8 1 0 1 0 9 1 0 1 0 10 1 0 0 0 11 1 0 0 0 12 1 0 0 0 colorred:fruitstrawberry 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 9 0 10 1 11 1 12 1 > fit<-lmFit(eset, design) Coefficients not estimable: colorred:fruitstrawberry Warning message: Partial NA coefficients for 54675 probe(s) My question here is: what should be the contrast matrix for a statistically sound contrast highlighting the "color" effect. Thanks in advance for hints. [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 838 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