Odds ratios instead of logits in stargazer() LaTeX output

后端 未结 4 1894
感情败类
感情败类 2020-12-13 21:00

When using stargazer to create a LaTeX table on a logistic regression object the standard behaviour is to output logit-values of each model. Is it possible to get exp(logit)

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 21:31

    So, the issue is that you want to display the (non-log) odds ratio, but keep the test statistics based on the underlying linear model. By default, when you use one of the "apply" methods, such as apply.coef = exp, stargazer will recalculate the t statistics and p values. We don't want that. Also, the standard errors are in the log basis, but we can't just exponentiate them. My preferred approach is to:

    1. exponentiate the coefs in stargazer
    2. turn off the auto p and auto t
    3. report (untransformed) t-statistics in the table instead of standard errors

    In code, this is:

    stargazer(model, apply.coef=exp, t.auto=F, p.auto=F, report = "vct*")
    

提交回复
热议问题