Announcement

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

  • Margins function and likelihood ratio test after multiple imputation

    Hi everyone,

    I'm using logistic regression after multiple imputations (ice). In my model, there is an interaction term. I want to use margins function, but it didn't work. I spent a lot of time googling and found a solution on the UCLA page. https://stats.idre.ucla.edu/stata/fa...-imputed-data/

    I followed their instruction and it worked. But the margins function only provide me coefficients, is there any way to have odds ratio instead? In addition, I also would like to a likelihood-ratio chi-square (eg: lrtest M1 M2) but it didn't work. I googled, and I saw some people say it is not supported using mi estimate. Is there any other way to run the test? Below are my codes, thank you so much for your help.

    program mimargins, eclass properties(mi)
    version 14
    logit druguse i.loss##i.transgen i.income_recode i.race i.educa_bi i.sex i.orien i.impage3_80 c.chronic i. relation2,or
    margins i.loss##i.transgen,asbalanced post
    end

    mi estimate, or: logit druguse i.loss##i.transgen i.income_recode i.race i.educa_bi i.sex i.orien i.impage3_80 c.chronic i. relation2
    estimates store M2

    mi estimate,cmdok: mimargins 1
Working...
X