Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression output for polr() together with margins() #174

Open
LuiNov opened this issue Jul 23, 2021 · 0 comments
Open

Regression output for polr() together with margins() #174

LuiNov opened this issue Jul 23, 2021 · 0 comments

Comments

@LuiNov
Copy link

LuiNov commented Jul 23, 2021

I am doing proportional odds function in R by M <- polr(Y ~ X1 + X2 ……). As I wan't to show the marginal effects I used margins (m) or ocME(m) after that.

MY PROBLEM:

I can't export the regression output together with the marginal effects in a "nice way".

WHAT I TRIED:

stargazer(M, summary(margins(m)), type = 'text', summary = FALSE) => SO I only got the output with a table of the margins output.

stargazer(M, coeff = list(c(NA, summary(margins(m)))))………

also with ocME(m)$out it didn't work

SO I TRIED OTHER PACKAGES:

export_summs, huxtable, modelsummary() etc. WORKED…… BUT PROBLEM the regression outputs coefficients are without labels while margins output is with labels (gender_L vs. gender_female). => SO: I got like two pages of table that isn't really readable .....

Does someone has a clue what I am doing wrong and what could help?

FOR CLEARANCE MY CODE (all variables are ordered factors with levels from 0 to the max fe. TM_4F = factor(TM_4, levels = c(0:3), labels = c('Immer', '1', '2', 'Nie'), ordered = T)

MODEL:

CSimple2 <- polr(TM_4F ~ Country + Sex_F + Age + Marital_F + NoChild + Edu_F + SEmp + AttRelServ_F,
method = 'probit', weights = Mult_dpWeight1000, Hess = T)

margins(CSimple2)
I am really bothered bc. I am stuck with this "simple problem". Thanks for your help in advance I am happy about everything :-)
Bildschirmfoto 2021-07-23 um 08 35 42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant