//
you're reading...
statistics, technology

Demonstration of {estout}


I wrote a short talk demonstrating the use the R package {estout} for tonight’s New England R Users Group meeting.  NB this is not a discussion of the econometric model, but rather a demonstration of how to get publication-quality results out of R efficiently.

The basic functions of {estout} are modeled on the Stata package estout. Once the R user has a dataset and a regression format in memory, {estout} will

  1. Print tables of summary statistics in CSV or LaTeX format.
  2. Print regression results in CSV or LaTeX format.

All the normal bells and whistles for econometrics are in there: reporting both coefficient estimates and their standard errors, asterisks for alpha=0.10, 0.05, and 0.01 significance levels, R-squared and number of observations. Options to customize are clearly marked in the documentation.


About these ads

About Ben Mazzotta

Ben Mazzotta is a postdoc at the Center for Emerging Market Enterprises (CEME). His study of the Cost of Cash is part of CEME's research into inclusive growth.

Discussion

2 thoughts on “Demonstration of {estout}

  1. Hi Ben,
    I just discovered this package today and it’s fantastic!

    One question: when I loop over models, I store them as elements in a list (called “res”).

    My guess is that I can do lapply(res, eststo), right? Also, does estout work fine with glm?

    I asked this because the table doesn’t come out exactly right (R^2 missing).

    Posted by polisciphd | September 21, 2013, 9:00 pm
    • I haven’t tried using the lapply method. One possible pitfall is that you would need to watch the behavior of the stored models. If you wanted individual tables printed, rather than several columns in a table, you might need to store the model, print it, and clear it in several steps.

      Two developments you should try for yourself. First is the stargazer package that will summarize data frames and models elegantly for LaTeX. Second is the knitr package that produces either LaTeX or HTML output. Recommend you work with sweave files or r markdown files in RStudio, that facilitates drafting and compiling them.

      Thank you for reading. Let me know how your apply code works with estout.

      Posted by Ben Mazzotta | September 27, 2013, 10:47 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Pages

CC License

Bookmark and Share
August 2010
M T W T F S S
« Jul   Sep »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Riposte

People mentioned in this blog are hereby invited to post a reply, on this blog, to any remarks, disparaging or otherwise, that I make here.

For that matter, if you're an interested reader and you'd like to share your thoughts, I would welcome proposals for cross-posting at your blog, guest blogging, and other creative ideas you may have.
Follow

Get every new post delivered to your Inbox.

%d bloggers like this: