2

It seems that the getSummary function for LME4 objects no longer plays well with the memisc package, and outputting LME4 model results to latex no longer works. The only alternative for exporting objects through stargazer however does not allow longtables. Has anyone come up with either a fix for the mtable format, or an alternative way to output these results into a longtable?

Edit:

Here is a reproducible example.

library(lme4)
library(memisc)

fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
mtable(fm1)

This used to work, but I believe that lme4 now produces a new object that is no longer recognized by the mtable/getsummary command.

CGN
  • 687
  • 1
  • 6
  • 12
  • 4
    Do you have some sample code you'd like to share with us? Have you tried the `latex` function in the `Hmisc` package perchance? – rawr Nov 18 '13 at 16:49
  • see also http://stackoverflow.com/questions/5465314/tools-for-making-latex-tables-in-r – EDi Nov 18 '13 at 18:18
  • I saw that link and originally used the memisc package. But an upgrade broke the integration with LME4 hence my question for an update. Texreg might be an option but since my code relies on the mtable function I was wondering if anyone has an update for that. – CGN Nov 18 '13 at 18:39
  • `memisc` at least is going to have to wait until someone (the maintainer or some kind volunteer) adapts the existing `*.mer` methods in `memisc` for `*.merMod` objects. It shouldn't be *too* hard, but it's a bit grubby and I don't have time to do it right now ... have you contacted the maintainer ... ?? – Ben Bolker Nov 21 '13 at 20:20

1 Answers1

0

Try this package stargazer

library(stargazer)

fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
stargazer(fm1, title="Results", align=TRUE)
Pablo Vilas
  • 546
  • 5
  • 13