Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Intercept / pseudo r-squared after mimrgns

    Hello everyone

    I do have a question about how to get the intercept in a mixed logistic modell with average marginal effects. I'm using Stata 15.1.

    I have multiple imputed data and do calculate a melogit model. Afterwards i calculate average marginal effects. The comand for the model is the following:

    Code:
      mi estimate , saving(miestfile1, replace) esample(esample) cmdok post :  melogit education_entry i.gender hisei_std i.school_absence2 t0wlem_std t0marklang1 requierements i.model_sek1 || aes_canton:    //, cluster(class)
      mimrgns using miestfile1 , esample(esample) predict(pr) dydx(*) post
    The command works. But i don't know how to get an intercept (or somehting like an intercept) after the mimrgns command.
    With a logit model and AMEs one could get the pseudo r-squared with fitstat. But that doesn't work with my command either. Is it possible to calcutalte a pseudo r-squared with a multiple imputated dataset and melogit? Or is it apropriate to take the intercept of the model with melogit and publish it with the results of the mimrgns command?

    In the end I've got the mimrgns results in my paper. But at the moment I've got no intercept or pseudo r-squared...

    I'm thankful if someone could help me.

    Kind regards
    andrea

  • #2
    In your margins statement, you asked for the marginal effect of each of the predictors. Margins isn't displaying anything like the average probability because you never asked for it - you asked for the marginal effects. There's nothing inherently wrong with what you asked.

    Also, what is the intercept in the logit (or mixed effect logit) model anyway? It's the base odds, and in this case, that's the base odds when all the predictors are set at zero. Do you really to know that, considering that some of your predictors look like they're continuous? I see some of them are standardized, so zero would be a logical value, but make sure this actually makes sense; if I put untransformed age in my model and I asked for margins at age = 0, that might not make sense (and my work deals with older adults, so it would be even more wrong than in other contexts). Also, you may have realized this, but remember that while logit models have their coefficients in either log odds units or in odds ratios, margins will always output things on the probability scale. And if you asked me, it would be acceptable to publish just the marginal effects. In my own work, I've tended to ask for margins at the mean levels of all the covariates (i.e. use the atmeans option).

    Moving to pseudo-r2. First, even in hierarchical linear models, people have defined a variety of r2s, and it's not clear that there's a universally accepted one. Second, when we move to MI + hierarchical linear models, there isn't a default estimate of r2. You could just collect the r2 from each of the MI data sets and report the average, but it isn't clear that this is correct. It may be better to transform the r2s first as described here. However, I'm not clear if that transformation is universally regarded as correct.

    Then, moving on to the fact that you have a hierarchical logit model ... I assume that if there's one or more accepted versions of the pseudo r2 for that type of model, you could transform and pool them.

    To be honest, in the academic circles I move in, people usually don't care that much about the pseudo r2, or even the r2 from linear models. Different academic disciplines are going to have different norms. I would vote for the pseudo r2 isn't critically important and it isn't available in a clear format after multiple imputation anyway.
    Be aware that it can be very hard to answer a question without sample data. You can use the dataex command for this. Type help dataex at the command line.

    When presenting code or results, please use the code delimiters format them. Use the # button on the formatting toolbar, between the " (double quote) and <> buttons.

    Comment


    • #3
      Thanks for your response!

      Comment

      Working...
      X