Converting lme4 syntax in lmm equation I have computed a model with the lme4 package with the following syntax:
y ~ time*treatment*covariate + (1|subject)
The variables include:

*

*time: Factor with 3 levels (measurement points)


*treatment: Factor with 3 levels


*covariate: Factor with 3 levels
Is there any way to translate the syntax into the model equation to include in my paper? If not, is the following equation correct?
$$
y_{ij} = \gamma_{00} + u_{0j}+\gamma_{10}time+\gamma_{01}treatment+\gamma_{02}covariate+\gamma_{03}time*treatment+\gamma_{04}time*covariate+\gamma_{05}treatment*covariate+\gamma_{06}time*treatment*covariate+\epsilon_{ij}
$$
 A: One useful tool you can use is the equatiomatic package, which has an extract_eq function which I know is at least adequate for Gaussian and logistic models (I've seen them reproduce formulas that seemed accurate from my understanding of mixed models). I provide an example below. First I load the requisite libraries:
#### Load Libraries ####
library(lmerTest)
library(equatiomatic)

Then fit a model with the carrots dataset from the lmerTest package:
#### Fit Model ####
fit <- lmer(Preference
            ~ sens2
            + Homesize
            + (1 + sens2 | Consumer),
            data=carrots)

Then extract the tex:
#### Extract Tex Equation ####
extract_eq(fit)

The output will look like this:
$$
\begin{aligned}
  \operatorname{Preference}_{i}  &\sim N \left(\alpha_{j[i]} + \beta_{1j[i]}(\operatorname{sens2}), \sigma^2 \right) \\    
\left(
  \begin{array}{c} 
    \begin{aligned}
      &\alpha_{j} \\
      &\beta_{1j}
    \end{aligned}
  \end{array}
\right)
  &\sim N \left(
\left(
  \begin{array}{c} 
    \begin{aligned}
      &\gamma_{0}^{\alpha} + \gamma_{1}^{\alpha}(\operatorname{Homesize}_{\operatorname{3}}) \\
      &\mu_{\beta_{1j}}
    \end{aligned}
  \end{array}
\right)
, 
\left(
  \begin{array}{cc}
     \sigma^2_{\alpha_{j}} & \rho_{\alpha_{j}\beta_{1j}} \\ 
     \rho_{\beta_{1j}\alpha_{j}} & \sigma^2_{\beta_{1j}}
  \end{array}
\right)
 \right)
    \text{, for Consumer j = 1,} \dots \text{,J}
\end{aligned}
$$

And will look like this when embedded in something that supports it:
$$
\begin{aligned}
  \operatorname{Preference}_{i}  &\sim N \left(\alpha_{j[i]} + \beta_{1j[i]}(\operatorname{sens2}), \sigma^2 \right) \\    
\left(
  \begin{array}{c} 
\begin{aligned}
  &\alpha_{j} \\
  &\beta_{1j}
\end{aligned}
  \end{array}
\right)
  &\sim N \left(
\left(
  \begin{array}{c} 
\begin{aligned}
  &\gamma_{0}^{\alpha} + \gamma_{1}^{\alpha}(\operatorname{Homesize}_{\operatorname{3}}) \\
  &\mu_{\beta_{1j}}
\end{aligned}
  \end{array}
\right)
, 
\left(
  \begin{array}{cc}
 \sigma^2_{\alpha_{j}} & \rho_{\alpha_{j}\beta_{1j}} \\ 
 \rho_{\beta_{1j}\alpha_{j}} & \sigma^2_{\beta_{1j}}
  \end{array}
\right)
 \right)
\text{, for Consumer j = 1,} \dots \text{,J}
\end{aligned}
$$
The one thing I would edit here is the $i$ and $j$ bracket notation which looks semi-wonky, but otherwise this looks correct. As far as your specific model, I can't guarantee it's accuracy, but you can try to see if it mimics the equation you have here.
