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
Related Posts with Margins function and likelihood ratio test after multiple imputation
How to reshape data from wide to long with "tricky" variable names and how to merge multiple data files?Hi, I have two questions regarding data cleaning: Q1) I have a following wide data and want to conv…
Variable with negative valuesHey, I'm stuck on a simple thing and would really need some help. I have a non-numeric variable ran…
Alternatives to ratio of two count variables when there are zerosHello everybody, I apologize in advance for the lengthy post but I just want to provide some contex…
Creating a new categorical variable by spousal agreement/disagreementHi, I'm trying to create a new categorical variable that indicates (heterosexual) spousal disagreeme…
Doing Bayesian modelling in StataHello This is something that has puzzled me for a while but I haven't pursued it because I use rsta…
Subscribe to:
Post Comments (Atom)
0 Response to Margins function and likelihood ratio test after multiple imputation
Post a Comment