# Issue with the mathematical equation of a Gamma glm with a random intercept

I wanted to write the mathematical equation for my model below. It is a glm that tries to explain the relationship between the sum of observed biomass of several replicas at different observation sites as a function of distance from a given point, plus the random effect of the sites. I also use the Gamma family. I used the extract_eq function of the equatiomatic package to obtain the mathematical equation of my model but I am not sure of the result obtained...

library(equatiomatic)
library(lme4)

mod <- glmer(Sbiomass ~ Dist_FPAcentroid + (1|site),family = Gamma(link = "log"),data =my_data)

extract_eq(mod)

###

\begin{aligned} \alpha_{j} &\sim N \left(\gamma_{0}^{\alpha} + \gamma_{1}^{\alpha}(\operatorname{Dist\_FPAcentroid}), \sigma^2_{\alpha_{j}} \right) \text{, for site j = 1,} \dots \text{,J} \end{aligned}


When I knit this result in RMarkdown, it doesn't work because of the line break between the first and second line. If I remove this line break I get this : However, it seems to me that this equation is not complete and is missing a part. Should it look more like the equation below or have I misunderstood ? You're fitting a conditional Gamma distribution with a log-link to the data. As such, the equations would be: $$\texttt{Sbiomass}_{ij}\sim \operatorname{Gamma}(\mu_{ij}, \phi)$$ where $$\phi$$ is the shape (assumed constant) and $$\mu_{ij}$$ is the conditional mean: $$\operatorname{E}(\texttt{Sbiomass}_{ij}\,|\,\texttt{Dist_FPAcentroid}_{ij}, \texttt{site}_{ij}) = \mu_{ij} = \exp(\beta_{0,j} + \beta_1\texttt{Dist_FPAcentroid}_{ij})\quad \text{for site} \;j=1, \ldots, J$$
with the random intercept assumed being drawn from a normal distribution: $$\beta_{0,j} \sim \operatorname{N}(0, \sigma^2_{\beta_0})$$