I have conducted a crossed-effect logistic regression using Stata's meqrlogit command and have been asked to provide the equation notation. I have participants (ID) who each rated 8 activities (act) and I am looking at the impact of 3 independent variables (iv1, iv2, iv3) on the outcome (use). Can anyone assist with what the equation would look like for this model?

meqrlogit use iv1 iv2 iv3 || _all: R.act || ID:


This is a logistic mixed effects model and it's equation can be written as:

$$\\log\left[ \frac { P( \text{use} = \text{1} ) }{ 1 - P( \text{use} = \text{1} ) } \right] =\mathbf{X \beta} + \textbf{Zb}$$

where $\mathbf{X}$ is the model matrix for the fixed effects, $\mathbf{\beta}$ is the fixed effects coefficient vector, $\textbf{Z}$ is the model matrix for the random effects, $\textbf{b}$ is the random effects vector and $\epsilon$ is the error term vector.

Another way to write this, using multilevel modelling-type notation, would be:

$$ \log\left[ \frac { P( \text{use} = 1 ) }{ 1 - P( \text{use} = 1 ) } \right] = \alpha_{j[i],k[i]} + \beta_{1}(\text{iv1}) + \beta_{2}(\text{iv2}) + \beta_{3}(\text{iv3}) \\ \text{, for ID j = 1,} \dots \text{,J} \\ \text{, act k = 1,} \dots \text{,K} \\ $$

  • $\begingroup$ It's a logistic model, so it's a glmm, not a lmm. $\endgroup$
    – LeelaSella
    May 3 at 19:53
  • $\begingroup$ @PSellaz Ah, yes you are right. I will amended the answer. $\endgroup$ May 3 at 21:07
  • $\begingroup$ Does this answer your question ? If so then please consider marking it as a the accepted answer and (if you haven't already) upvoting it. If not, please could you let us know why so that it can be improved $\endgroup$ Jun 4 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.