Different outputs of glmmTMB (Ar1) between ordererd and not-ordered factor

14 Views Asked by At

I ran a glmmTMB with the factor 'Tempo' (4 levels: 0, 6, 11, 30) as fixed effect. Then, I repeated the run, but in this case, I ordered the factor 'Tempo.' The outputs showed differences, and also, in the ordered run, the levels of the factor changed their names, making it difficult to know which level is being reported. Does anybody know why these differences exist, and is there any way to avoid glmmTMB changing the names of levels in the ordered approach?

Output with factor Tempo Not-ordered:

> Tudo.rel.BFT$Tempo <- factor(Tudo.rel.BFT$Tempo)
> m03.reml <- glmmTMB( p__Verrucomicrobiota ~ Tratamento + Tempo + ar1(0+Tempo|Tanque), family=beta_family(link = "logit"), zi=~1, data=Tudo.rel.BFT, REML = TRUE)
> summary(m03.reml)

Family: beta  ( logit )
Formula:          p__Verrucomicrobiota ~ Tratamento + Tempo + ar1(0 + Tempo | Tanque)
Zero inflation:                        ~1
Data: Tudo.rel.BFT

     AIC      BIC   logLik deviance df.resid 
   -91.0    -77.8     54.5   -109.0       28 

Random effects:

Conditional model:
 Groups Name   Variance Std.Dev. Corr      
 Tanque Tempo0 0.1356   0.3682   0.09 (ar1)
Number of obs: 32, groups:  Tanque, 8

Dispersion parameter for beta family (): 3.08e+03 

Conditional model:
                  Estimate Std. Error z value Pr(>|z|)    
(Intercept)        -1.9948     0.1502 -13.284  < 2e-16 ***
TratamentoControl  -0.6559     0.1444  -4.542 5.58e-06 ***
Tempo6              0.4403     0.1781   2.472 0.013422 *  
Tempo11             0.6709     0.1858   3.611 0.000305 ***
Tempo30             0.5005     0.2021   2.477 0.013251 *  
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Zero-inflation model:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)   -22.62   14430.01  -0.002    0.999

Output with factor Tempo ordered

> Tudo.rel.BFT$Tempo <- ordered(Tudo.rel.BFT$Tempo, levels = c("0", "6", "11", "30"))
> m03.reml <- glmmTMB( p__Verrucomicrobiota ~ Tratamento + Tempo + ar1(0+Tempo|Tanque), family=beta_family(link = "logit"), zi=~1, data=Tudo.rel.BFT, REML = TRUE)
> summary(m03.reml)

Family: beta  ( logit )
Formula:          p__Verrucomicrobiota ~ Tratamento + Tempo + ar1(0 + Tempo | Tanque)
Zero inflation:                        ~1
Data: Tudo.rel.BFT

     AIC      BIC   logLik deviance df.resid 
   -89.6    -76.5     53.8   -107.6       28 

Random effects:

Conditional model:
 Groups Name   Variance Std.Dev. Corr      
 Tanque Tempo0 0.1356   0.3682   0.09 (ar1)
Number of obs: 32, groups:  Tanque, 8

Dispersion parameter for beta family (): 3.08e+03 

Conditional model:
                  Estimate Std. Error z value Pr(>|z|)    
(Intercept)       -1.59183    0.10374 -15.345  < 2e-16 ***
TratamentoControl -0.65590    0.14442  -4.542 5.58e-06 ***
Tempo.L            0.38733    0.14319   2.705  0.00683 ** 
Tempo.Q           -0.30533    0.13480  -2.265  0.02351 *  
Tempo.C           -0.04277    0.12547  -0.341  0.73321    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Zero-inflation model:
            Estimate Std. Error z value Pr(>|z|)
(Intercept)   -22.62   14430.01  -0.002    0.999

I checked both outputs, and there were minor changes in AIC, BIC, log-likelihood, and random effects model. However, the significance of one item in the Conditional model is different, Although is not possible to see which level is different.

0

There are 0 best solutions below