I am trying to run quite a few multinomial regression models. Stargazer seems like a great tool to report all results in one document for easy access. However, I noted that I get some negative confidence intervals, which does not make sense.
I tried using apply.coef=exp
alone, where I got negative confidence intervals
I also tried using apply.coef=exp
and apply.ci=exp
where the confidence interval does not make sense.
When I do apply.ci=exp
by itself the CI are correct but it does not exponentiate the coefficient.
Health has 3 levels (poor, intermediate, ideal), poor is reference ETI is continuous.
test1 <- multinom(Health ~ ETI, data = X)
test2 <- multinom(Health ~ ETI + age + male, data = X)
test3 <- multinom(Health ~ ETI + age + male +educ +married+employed+income, data = X)
test4 <- multinom(Health ~ ETI + age + male +educ +married+depression+employed+income, data = X)
First code (only apply.coef
)
stargazer(test1, test2, test3, test4, type="html", list(confint(test1, test2, test3, test4)),column.labels = c("Model1", "Model2", "Model3", "Model4"),column.separate = c(2,2,2,2), apply.coef=exp, out="X.htm")
The second code I tried (only apply.ci
):
stargazer(test1, test2, test3, test4, type="html", apply.coef = exp list(confint(test1, test2, test3, test4)),column.labels = c("Model1", "Model2", "Model3", "Model4"),column.separate = c(2,2,2,2), apply.ci=exp,apply.coef=exp, out="X.htm")
The last code (both apply.ci
& apply.coef
):
stargazer(test1, test2, test3, test4, type="html", apply.coef = exp list(confint(test1, test2, test3, test4)),column.labels = c("Model1", "Model2", "Model3", "Model4"),column.separate = c(2,2,2,2), apply.ci=exp,apply.coef=exp, out="X.htm")
For the 1st code:
# Ideal Int
#Model1
# (1) (2)
#ETI 0.453* 0.761***
#(-0.051, 0.956) (0.413, 1.109)
The exponentiated coefficients are correct but CI is wrong
For the 2nd code:
# Ideal Int
#Model1
# (1) (2)
#ETI -0.793*** -0.273
#(0.273, 0.749) (0.538, 1.078)
The CI is correct and matches with cofint
For the 3rd code:
# Ideal Int
# Model1
# (1) (2)
#ETI 0.453* 0.761***
#(0.950, 2.602) (1.512, 3.033)
The CI is wrong, I think it is doubly exponentiating