-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature suggestion: vector with dependent variable names for pander.lm() and such. #46
Comments
Sorry, I am not really familiar with As far as I see now you are missing the But could you please also suggest what other useful features |
Hmm, that's an interesting question. Well, where stargazer goes a bit amiss to my taste, is that it presents models vertically, model estimates in a single column, significance marked with stars. It is a great feature if you want to present multiple models in the same table, but if you want to give just a single model, it is best to supply all the stuff that R gives in Second, stargazer presents some additional information about the model: R-square, R-square adjusted, number of observations in the model, residual std. error, F-statistic, df. This looks pretty cool, and is often useful (since by default R removes incomplete observations, and you can unknowingly include a variable with many missings). This output can be suppressed, and this is also a nice to have feature. This info is printed in a small font and does not clutter the table (an important thing). Maybe not all of this info for pander, but R-square adjusted and N are a good idea. Third, stargazer can include a note beneath the model, in small print e.g. about what the stars signify. Again, not sure if this can be done with Markdown. Include an additional cell with a superscript note maybe? The note can say anything, it can be a remark about the model etc. Oh, this is a good one, and probably easy to implement. Stargazer can suppress the output on certain variables. For instance, recently I had a model with a nominal variable with 16 categories (sector), of which only one was significant, and I was not interested in sector per se, this was just a control. So I suppressed the output of that variable, which gave me a much cleaner output. I wrote in the note that the model includes sector, but it is not rendered in the table. Otherwise can't think of much else really. |
Thank you very much for the great ideas, I do really appreciate that! I did something in the above commit about your first suggestion:
But will definitely tweak these options further in the next few days. Based on this new option, the "Intercept" was moved to the end of the table (just like with |
Perfect, this representation is actually publication quality now I believe. Some journals might be picky and require more, but for general purpose writing it is a "ready-to-wear" solution for sure. Reports and such. Thank you very much, this is of great practical use. |
Thank you very much again for the feedback. I have just pushed some further updates about a basic solution to show e.g. the R-squared (that I could not merge to the current table but had to print it into a separate table - which does not look very bad on a HTML/odt/docx output) and also an option to suppress a some rows based on passed regular expression (with
And of course I will keep thinking about these issues, as tons of neat things still have to be finished (and applied to other models). |
I have only just discovered Two things that come to mind and would be great additions to the package would be letting standard errors be set below the point estimate, see for example
and allowing for customized standard errors (see for example section 2.2 here) Overall, I think the optimal strategy would be to make Thanks for a great package! |
Thank you @sebastianbarfort, the idea is indeed inspiring. I used to raise objection for such ideas thanks to the limitations of Pandoc's markdown (as there is no support for col/row spans), but I tend to think about possible workarounds as it seems that column and row spanning will never be supported by Pandoc. As far as I see now, a fair trade-off would be implementing the output with line-breaks in multi-line markdown tables, similar to what I suggested for |
Probably this is resolved with #80. But please verify, and I would of course love to hear your feedback. |
A very nice feature of pander is the ability to render models (lm, etc) in Markdown syntax. This allows a very seamless integration of model presentation, as MD tables are easily converted both to PDF and docx with pandoc. The stargazer package (which can be seen as a similar tool for the purpose of model rendering) produces LaTeX code, and thus works (automatically) only for conversion to PDF. So far so good.
One of the features from stargazer I really miss in pandoc is the ability to specify variable names in the model output. Pander simply takes the original variable names, and this approach fails when variables are factors. R assigns them names like "gendermale" or "educationlowe". These need to be edited by hand before being put in a publishable text.
It is not difficult by all means, just edit the tables manually before the publication, and that's it. However it would be better if these reader-friendly names could be specified programmatically.
Well, that and thanks for pander, it is really a pleasure working with it.
The text was updated successfully, but these errors were encountered: