Message-ID: <519D50710200000C00015C97@mailhost.biomec.upv.es>
Date: 2013-05-22T21:10:41Z
From: Helios de Rosario
Subject: "contrasts apply only to factors" in post-hoc analysis afer lmer fitting
Hello, sorry to catch up this message so long after the original post.
>
> Hi everyone,
>
> I am applying generalized linear mixed model to RNA-seq data under
> quasi-poisson distribution. Here is the an example:
>
> > ts.da
> value tp tpf treat cellline obs_effect
> 1 73 6 T6 ETOH A 1
> 2 54 6 T6 ETOH B 2
> 3 62 12 T12 ETOH A 3
> 4 54 12 T12 ETOH B 4
> 5 54 24 T24 ETOH A 5
> 6 56 24 T24 ETOH B 6
> 7 31 48 T48 ETOH A 7
> 8 82 48 T48 ETOH B 8
> 9 72 6 T6 shMYCN C 9
> 10 95 6 T6 shMYCN D 10
> 11 64 12 T12 shMYCN C 11
> 12 90 12 T12 shMYCN D 12
> 13 51 24 T24 shMYCN C 13
> 14 64 24 T24 shMYCN D 14
> 15 46 48 T48 shMYCN C 15
> 16 63 48 T48 shMYCN D 16
>
[snip]
> The specified model worked fine:
> possionmix.full <- lmer(value ~ tpf * treat + (1|cellline)
+(1|obs_effect)
> ,data=ts.da, family=poisson)
>
[snip]
> Then I tried to to post-hoc analysis with "phia":
> > testInteractions(possionmix.full)
> Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") : contrasts
> apply only to factors
>
> I am pretty sure that tpf and treat are factors:
>
> > ts.da$tpf
> [1] T6 T6 T12 T12 T24 T24 T48 T48 T6 T6 T12 T12 T24 T24 T48 T48
> Levels: T6 T12 T24 T48
>
> > ts.da$treat
> [1] ETOH ETOH ETOH ETOH ETOH ETOH ETOH ETOH shMYCN
shMYCN
> [11] shMYCN shMYCN shMYCN shMYCN shMYCN shMYCN
> Levels: ETOH shMYCN
>
Yes, that's an unfortunate bug in testFactors(), that caused that
problem under some
circumstances for mixed models. I have solved it, and will be fixed in
the next release of phia soon.
Best regards
Helios De Rosario
INSTITUTO DE BIOMEC?NICA DE VALENCIA
Universidad Polit?cnica de Valencia ? Edificio 9C
Camino de Vera s/n ? 46022 VALENCIA (ESPA?A)
Tel. +34 96 387 91 60 ? Fax +34 96 387 91 69
www.ibv.org
Antes de imprimir este e-mail piense bien si es necesario hacerlo.
En cumplimiento de la Ley Org?nica 15/1999 reguladora de la Protecci?n
de Datos de Car?cter Personal, le informamos de que el presente mensaje
contiene informaci?n confidencial, siendo para uso exclusivo del
destinatario arriba indicado. En caso de no ser usted el destinatario
del mismo le informamos que su recepci?n no le autoriza a su divulgaci?n
o reproducci?n por cualquier medio, debiendo destruirlo de inmediato,
rog?ndole lo notifique al remitente.