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.

*Related*

To

**leave a comment** for the author, please follow the link and comment on their blog:

** The PolStat R Feed**.

R-bloggers.com offers

**daily e-mail updates** about

R news and

tutorials on topics such as: visualization (

ggplot2,

Boxplots,

maps,

animation), programming (

RStudio,

Sweave,

LaTeX,

SQL,

Eclipse,

git,

hadoop,

Web Scraping) statistics (

regression,

PCA,

time series,

trading) and more...

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook...