Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
As a PhD student that uses quantitative methods a lot, one annoying part of my job is to type up my results, especially formatting tables with regression models can be a lot of work. Luckily there is an excellent package in R, apsrtable, which will generate very nice looking tables from a variety of regression objects . However the apsrtable package does not play nice with regression objects from the zelig and statnet packages, and I use both of these in my work quite a lot. I use Zelig for running rare-event logit models, and statnet for doing SNA and running exponential random graph (ERG) models.
I had a look at the source code for the apsrtable package, and it turns out it is not very difficult to modify, so as to generate LaTeX tables from Zelig and ERG models (most of the work is to specify where to find the coefficients and standard errors). So I created two r scripts to generate LaTeX tables from Zelig objects and ergm objects from the statnet package.
Below is a Sweave file which will demonstrate how to use the two scripts (it is very simple!), and links to the two scripts:
This pdf show the output from the Sweave file
Finally, just to be clear, I am literally standing on the shoulders of Michael Malecki, the author of the apsrtable package, the above files a just modified versions of his original r script.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.