Odds ratios instead of logits in stargazer() LaTeX output

后端 未结 4 1893
感情败类
感情败类 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条回答
  •  -上瘾入骨i
    2020-12-13 21:33

    As per symbiotic comment in 2014, more recent versions of ''stargazer'' have the options ''apply.*'' for ''coef'' ''se'' ''t'' ''p'' and ''ci'' allowing the direct transformation of these statistics.

    apply.coef a function that will be applied to the coefficients.
    apply.se a function that will be applied to the standard errors.
    apply.t a function that will be applied to the test statistics.
    apply.p a function that will be applied to the p-values.
    apply.ci a function that will be applied to the lower and upper bounds of the confidence intervals.
    

    Meaning you can directly use...

    stargazer(model, 
              apply.coef = exp,
              apply.se   = exp)
    

    EDIT : I have noticed however that simply exponentiating the CIs does not give what you would expect.

    EDIT : You can obtain the correct CIs using the method described here.

提交回复
热议问题