R: reproducing R hurdle regression summary table into latex output - r

I have been performing the hurdle regression (from: library(pscl), using the command summary(hurdle(y~x))) for my supervisor and now I am trying to make the hurdle regression summary output into a latex table. However for some reason none of the usual tricks work - xtable(), regtex(), latextable() all refuses to convert the summary table into a latex output. I even tried stargazer() but of course the answer was no. Is there anyway I can convert the hurdle regression summary table into a latex output? I am not comfortable with LaTex and making one from the scratch would be really painful!
EDIT: What is remarkable about this problem is that stargazer and texreg both (the latter is more reasonable to me cause it gives both parts of the model) give output on the console but throw an error in knitr documents.

Related

How to display a large Regression output in RMarkdown (for PDF)

I am learning different statistical models and how to compute them using R.
I want to display the summary of a large multinomial logistic regression model in RMarkdown so that I am able to generate a PDF file.
However, only one page with the regression results is visible in the generated PDF file. The other results are simply cut off.
This is what I get:
I have tried the following code to output the summary of my model:
```{r, results = 'asis'}
texreg(model_pchoice)
```
I expect to generate a nice PDF File with an appealing table (spanning several pages if necessary). How could I proceed?

Scale Regression Summary in Beamer Presentation

In order to create a presentation, I use R Markdown. I'd like to print a linear regression (lm) or mixed-effects model (lmer) summary on a slide. However, it does not fit neatly on the slide and I searched the web for a method that allows me to scale the summary, but I couldn't find anything useful. Of course, I could delve deeply into the LaTeX configuration of my Markdown document. However, I was wondering whether there is a quick solution e.g., using a certain package, function or set up the relevant chunk differently?
I use stargazer to create the regresssion tables, there you can change the font size with font.size, the column spacing withcolumn.sep.width and/or print the regressions on one row with single.row = TRUE.

saving tables (e.g. latex) from Bayesian estimation functions in R

I would like to save the results of a Bayesian estimation function (e.g. brm) to file (e.g. in Latex format), for sharing results and preparing publications. It appears that existing packages (e.g. xtable, stargazer) are designed with non-Bayesian statistics in mind and cannot handle these model objects. Are there any existing packages or available code to handle this task (before I begin to recreate the wheel)? I have found tools for making tables from models estimated using JAGS/BUGS here but brm uses stan to estimate models.
If you call launch_shinystan on the object and go to the Estimate tab, there is a link to Generate LaTeX table that gives you a bunch of options to check on the left and it outputs the syntax on the right.
For posterity's sake, for basic tables one may also access specific parts of the model by for example:
summary(model)$fixed
where model is a stanfit object, and pass that to xtable or another function to output latex tables.

R: Pander does not correctly number summary tables from regression output

I am using pander to print regression output. However, it is automatically (incorrectly) labeling the tables. I have tried to use setcaption to override this habit, but it simply puts the caption to the right of the automated table number.
Any thoughts?

PLM object to LaTeX table

How can I make LaTeX tables with plm objects?
I have been using apsrtable to make LaTeX tables for output summaries for lm objects, but can't seem to find an easy way to do the same with plm. I am calculating panel corrected standard errors using plm and VcovBK(), but then have to go into latex and change the standard errors by hand.
As of version 2.0, the stargazer package supports PLM objects. It also makes some very nice tables, so it is worth a look.
A general approach which shouod work is to put your results in a data.frame and use xtable to create a LaTex table. This might take a bit more work than using premade templates, but it is very flexible.

Resources