Thanks for the suggestion. Do you think that LaTeX or other tabular types of output should be included in the MixedModels package or in a separate package?
Personally, I don’t have a strong preference either way. RegressionTables.jl works fine for other packages and it feels unexpected that it doesn’t work for MixedModels. But PrettyTables is not a huge dependency so it could be included without much cost.
I think the easy bit is converting the individual components to tabular format (e.g. VarCorr or CoefTable), but having the entire model summary in a single table is a bit harder. There’s nothing to stop wrapping multiple tables (tabular) in a single LaTeX table floating environment, but that’s not quite a single table. I have a proposal for a single table, but it looks nothing like the default show method for models in the REPL.
I think the solution is to add MIME/Markdown show methods to MixedModels.jl itself and maybe include support for RegressionTables.jl in the MixedModelsExtras.jl package that I’ve marked off (but not yet started filling in) for just such types of functionality. (ICC and potentially an inefficient implementation of the Kenward Roger approximation for the denominator degrees of freedom are other candidates.)
So you’ll be able to do this: show(open("file.md", write=true), MIME"text/markdown", model) or show(MIME"text/markdown", model). With pandoc, you can then convert those quite easily to LaTeX or HTML as needed. And all of this without adding any extra dependencies.
I probably won’t get around to direct support for LaTeX a little bit, because there are some options to think about there (e.g. booktabs or not? what tricks do we do to decimal-point alignment? etc.). In other words: mostly a bit of a tedious time investment i don’t have at the moment, especially when Markdown can be converted to LaTeX via pandoc.
I can’t speak for MixedModels.jl, but RegressionTables.jl supports (in the latest version) any <: RegressionModel, and should therefore work with output from MixedModels (I say should because I haven’t tried… if there are problems, please file an issue).
@jzr No, and that’s because different models are different entities and so get different tables. That said, internally it’s all Markdown tables that are then converted to different MIME types using the stdlib, so for comparable models(*) you should be able to concatenate those tables.
(*) There’s a lot of fine print on comparable. For the fixed effects, yes, because you can extract those with coeftable quite easily, but for the random effects/variance components, … That’s something rather specific which doesn’t correspond directly to anything in the RegressionModel API. But if you’re just comparing fixed-effects estimates across different models, then RegressionTables.jl will probably be fine. I don’t see anything in the estimator field that corresponds to mixed models though – we’re not using OLS (we’re using penalized least squares) but that’s not what’s relevant for interpreting the model anyway. By default, we’re using the maximum-likelihood estimates, though we also support REML. We don’t support any other pseudo-/quasi “likelihoods”.