[R] Format regression result summary

Paul Johnson pauljohn32 at gmail.com
Tue Apr 15 19:11:27 CEST 2008


On Fri, Apr 11, 2008 at 11:05 AM, Thiemo Fetzer <tf at devmag.net> wrote:
> Hello to the whole group.
>
>  I am a newbie to R, but I got my way through and think it is a lot easier to
>  handle than other software packages (far less clicks necessary).
>
[snip]
>  However, my wish is the output to have a format like:
>
>                              Estimate
>  (Intercept)                  3.750367***
>                                         (0.172345)
>  Var1                          -0.002334
>                                         (0.009342)
>  Var2                                 0.012551*
>                                         (0.005927)
>
>  Thanks a lot in advance
>
>  Thiemo
>

I attach an R function "outreg" that can make nice looking regression
tables in various formats.  I was thinking about writing something for
R news about this, but stopped to wait because I could not figure a
way to get lmer objects to print out in some pleasant way.  I have
several students and colleagues who use this, no problem lately.

This pdf demonstrates some of the kinds of output it can create.

http://pj.freefaculty.org/R/outreg-worked2.pdf

The R code here is not pretty, I'm obviously trying to do things that
are not anticipated by the original developers.  I found it a bit
tedious to do output with "cat" and so forth, but never found a more
elegant way.

If anybody wants to help with beautifying the code, please give me
some pointers.

-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas


More information about the R-help mailing list