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
error on storing regression results into matrixHi, My model is as follows: Code: bysort Z: reg y x i.(W) where Z is a categorical variable and W…
Represent different levels of categorical variables in coefplot as StackedHello, I am trying to see the relationship between diet and exercise with mental health disorder wi…
Levels of clustered standard errorsHi All, I have pooled data with 2500 funds, 2200 firms, and 20 time periods. Each fund could hold s…
Creation of a variable to identify year and month (time series data)Hi all. I have a time series dataset with information on political scandals involving the president …
Getting rid of entire variables due to single outlier observationsI have a dataset where values should be between 0.25 and 1.25 in order to makes sense. Values that a…
Subscribe to:
Post Comments (Atom)
0 Response to Margins function and likelihood ratio test after multiple imputation
Post a Comment