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 ?
Thank you in advance for your reply