Any way to produce a LaTeX table from an lme4 mer model fit object?

那年仲夏 提交于 2019-12-02 18:43:12
Ramnath

Here is a blog post that seems tailor made for this situation Latex Tables for lme4 Models

The answer may be a bit late, but perhaps somebody may find it interesting:

library("texreg")
texreg(fm1)

To typeset multiple lme4 or other models side by side, use something like this:

texreg(list(fm1, fm2))

I may have a hacky solution. I wanted the same thing, specifically the table of coefficients from a glmer model fit (the estimates, SEs, z, and p values). Finding the right part of the summary output and feeding that into xtable seems to have done the trick. Apologies for not supplying reproducible code & data, but from your original example:

fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
xtable(summary(fm1)@coef)

Should give you the table of coefficients, SEs, etc. Note that it just gives the values, not the extra dressing-up of significance stars, etc.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!