Question: Limma: Coefficients not estimable
0
gravatar for Davide
12 days ago by
Davide10
Davide10 wrote:

Can someone help with making this design full rank and thereby fix this error:

Coefficients not estimable: GroupPlacebo GenderMale

Does anyone know how to fix this so I can run as contrasts:

cont.matrix = makeContrasts(
  ana1=GroupGroup1-GroupPlacebo,
     ana2=(GroupGroup1-GenderFemale)-(GroupGroup1-GenderMale),
       levels=m)

Many thanks for your time in advance

       (Intercept) GroupGroup1 GroupGroup2 GroupGroup3 GroupPlacebo GenderFemale GenderMale
101_Day1           1           0           0           1            0            1          0
102_Day1           1           0           0           1            0            0          1
103_Day1           1           0           0           1            0            0          1
104_Day1           1           0           0           0            1            1          0
105_Day1           1           0           0           1            0            1          0
106_Day1           1           0           0           0            1            0          1
107_Day1           1           0           0           1            0            1          0
108_Day1           1           0           0           1            0            1          0
109_Day1           1           0           0           1            0            1          0
110_Day1           1           0           0           0            1            1          0
111_Day1           1           0           0           1            0            0          1
112_Day1           1           0           0           1            0            0          1
113_Day1           1           0           0           0            1            0          1
114_Day1           1           0           0           1            0            0          1
115_Day1           1           0           0           1            0            0          1
116_Day1           1           0           0           1            0            1          0
117_Day1           1           0           0           1            0            0          1
118_Day1           1           0           0           0            1            1          0
119_Day1           1           0           0           1            0            0          1
120_Day1           1           0           0           1            0            1          0
201_Day1           1           0           0           0            1            0          1
202_Day1           1           0           1           0            0            0          1
203_Day1           1           0           1           0            0            0          1
204_Day1           1           0           1           0            0            0          1
205_Day1           1           0           1           0            0            1          0
206_Day1           1           0           0           0            1            1          0
207_Day1           1           0           1           0            0            0          1
208_Day1           1           0           1           0            0            0          1
209_Day1           1           0           1           0            0            0          1
210_Day1           1           0           1           0            0            1          0
211_Day1           1           0           0           0            1            0          1
212_Day1           1           0           1           0            0            0          1
213_Day1           1           0           1           0            0            0          1
214_Day1           1           0           0           0            1            1          0
215_Day1           1           0           1           0            0            1          0
216_Day1           1           0           1           0            0            1          0
217_Day1           1           0           1           0            0            0          1
218_Day1           1           0           1           0            0            1          0
219_Day1           1           0           0           0            1            0          1
220_Day1           1           0           1           0            0            1          0
301_Day1           1           1           0           0            0            1          0
302_Day1           1           1           0           0            0            0          1
303_Day1           1           0           0           0            1            1          0
304_Day1           1           1           0           0            0            1          0
305_Day1           1           1           0           0            0            1          0
306_Day1           1           0           0           0            1            1          0
307_Day1           1           1           0           0            0            1          0
308_Day1           1           1           0           0            0            1          0
309_Day1           1           1           0           0            0            1          0
310_Day1           1           0           0           0            1            0          1
311_Day1           1           1           0           0            0            1          0
312_Day1           1           1           0           0            0            0          1
313_Day1           1           1           0           0            0            1          0
314_Day1           1           1           0           0            0            1          0
315_Day1           1           0           0           0            1            0          1
316_Day1           1           1           0           0            0            1          0
317_Day1           1           1           0           0            0            0          1
318_Day1           1           1           0           0            0            0          1
319_Day1           1           0           0           0            1            0          1
320_Day1           1           1           0           0            0            0          1
attr(,"assign")
[1] 0 1 1 1 1 2 2
attr(,"contrasts")
attr(,"contrasts")$Group
        Group1 Group2 Group3 Placebo
Group1       1      0      0       0
Group2       0      1      0       0
Group3       0      0      1       0
Placebo      0      0      0       1

attr(,"contrasts")$Gender
       Female Male
Female      1    0
Male        0    1

m<- model.matrix(  ~ Group + Gender , data=X, contrasts.arg = lapply(data.frame(X[,sapply(data.frame(X), is.factor)]),
                                                          contrasts, contrasts = FALSE))

Thank you for your time

rna-seq limma R • 155 views
ADD COMMENTlink modified 11 days ago by h.mon30k • written 12 days ago by Davide10

Please use the formatting bar (especially the code option) to present your post better. You can use backticks for inline code (`text` becomes text), or select a chunk of text and use the highlighted button to format it as a code block. Like I said before, please avoid using <pre> tags - they override the site's syntax highlighting features.
code_formatting

ADD REPLYlink modified 12 days ago • written 12 days ago by RamRS28k
2
gravatar for Devon Ryan
11 days ago by
Devon Ryan96k
Freiburg, Germany
Devon Ryan96k wrote:

You can't estimate placebo effect AND treatment effect, since one is the reverse of the other (i.e., placebo is necesarily the opposite of treatment). Likewise, estimating the effects of male and female makes no sense, since you need some baseline for comparison (i.e., if you measure the effect of being male then you already measured the effect of being female...it's the reverse).

Alternatively, since you want to use contrasts anyway you could also just remove the intercept in your design (~0+Group+Gender).

ADD COMMENTlink written 11 days ago by Devon Ryan96k
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 2.3.0
Traffic: 1392 users visited in the last hour