Hello everyone,

for my current research, I employ a hybrid logit model for a binary outcome variable following Allison (2009) on how to write the Stata code for the hybrid model by hand. Because of imputed data in my dataset (mi set wide), I cannot use Perales and Schunk’s xthybrid command.

I fit the random effects model using the xtlogit command with the following variables (stata 15):
  • binary Outcome
  • Var_1 (time-varying)
  • Var_2 (time-varying)
  • Var_3 (time-varying)
  • Var_4 (time-invariant)
  • Var_5 (time-invariant)
To fit the hybrid model, I calculated the individual-specific means for each independent time-varying variable (variable names beginning with m_) and the deviations from the means (variable names beginning with d_).
I also included an interaction of Var_3 (time-varying) and Var_5 (time-invariant) in the model. Following the advice by Allison, I treated the Interaction as just another variable. Thus, I first created the product Var_3XVar_5 and then calculated the means (m_Var_3XVar_5) and deviations (d_Var_3XVar_5) of that product.

My model looks like this:
Code:
mi estimate, dots saving(miestfile_H1, replace): xtlogit Outcome d_Var_1 d_Var_2 d_Var_3 m_Var_1 m_Var_2 m_Var_3 Var_4 Var_5 d_Var_3XVar_5 m_Var_3XVar_5, re i(ID)
To obtain odds ratios, I used:
Code:
mi estimate using miestfile_H1, or
However, I also want to obtain average marginal effects.

After estimating the model with mi estimate, I write the following code:
Code:
mimrgns, predict(pr) dydx(*) eform
However, even after several hours I don't get any output from stata. Am I still on the right track at this point regarding the code?

Can anyone help me?