# Which one (conditional or dispersion model) is the final result in glmmTMB? [closed]

model1<-glmmTMB(ctmax ~ lat+ (1|site), dispformula=~lat,data=data)
summary(model1)

got this output

Family: gaussian  ( identity )
Formula:          ctmax ~ lat + (1 | site)
Dispersion:             ~lat
Data: data

AIC      BIC   logLik deviance df.resid
1126.1   1146.5   -558.1   1116.1      428

Random effects:

Conditional model:
Groups   Name        Variance Std.Dev.
site     (Intercept) 1.631    1.277
Residual                NA       NA
Number of obs: 433, groups:  site, 21

Conditional model:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 44.69706    1.37032   32.62   <2e-16 ***
lat          0.08627    0.05073    1.70    0.089 .
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Dispersion model:
Estimate Std. Error z value Pr(>|z|)
(Intercept)  0.17803    0.34125   0.522   0.6019
lat          0.02427    0.01286   1.887   0.0591 .
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
$$`$$
• Can you clarify what you mean by "final" ... ?? May 8 at 12:44
• I meant by final how will I write the result? For example, our result shows that there is no significant correlation between ctmax and latitude. Here, will I mention (p = 0.089 or 0.0591? May 8 at 12:47
• @LukasLohse tells you how to write the model. $p = 0.089$ refers to the statistical significance of the effect of latitude on the mean of ctmax; $p=0.0591$ refers to the stat. sig. of the effect of latitude on the variance (dispersion) of ctmax May 8 at 13:29
• Thank you so much for the clarification. May 9 at 0:07

Both are final. The conditional model fits the mean, the dispersion models the variance via a log-link(see help("glmmTMB")). The variance being related to lat shows that a normal linear model would be heteroskedastic.

Your resulting description of ctmax is that $$ctmax \sim \mathcal N (\mu = 0.08627 \cdot \textrm{lat} + 44.69706 + b_{site}, \sigma^2 = \exp(0.02427 \cdot \textrm{lat} + 0.17803))$$ with random effect $$b_{site}\sim \mathcal N(0, 1.631)$$.

Here is an example in R:

n <- 5000
x <- rnorm(n)
y <- rnorm(n, mean = 1.5 * x + 4, sd = exp(0.1*x + 0.2))
model1 <- glmmTMB(y ~ x, dispformula = ~ x)
summary(model1)

Family: gaussian  ( identity )
Formula:          y ~ x
Dispersion:         ~x

AIC      BIC   logLik deviance df.resid
16222.1  16248.1  -8107.0  16214.1     4996

Conditional model:
Estimate Std. Error z value Pr(>|z|)
(Intercept)  3.99747    0.01750  228.48   <2e-16 ***
x            1.50929    0.01709   88.31   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Dispersion model:
Estimate Std. Error z value Pr(>|z|)
(Intercept)  0.40487    0.02000   20.24   <2e-16 ***
x            0.20827    0.01998   10.42   <2e-16 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

• Thank you for your clarification. May 9 at 12:00