[R] Visualization of coefficients

David Winsemius dwinsemius at comcast.net
Wed Jul 7 18:37:33 CEST 2010


On Jul 7, 2010, at 10:19 AM, Michael Friendly wrote:

> Tal Galili wrote:
>> Hello David,
>> Thanks to your posting I started looking at the function in the arm  
>> package.
>> It appears this function is quite mature, and offers (for example)  
>> the
>> ability to easily overlap coefficients from several models.
>> I updated the post I published on the subject, so at the end of it  
>> I give an
>> example of comparing the coef of several models:
>> http://www.r-statistics.com/2010/07/visualization-of-regression-coefficients-in-r/
>> Thanks again for the pointer.
>> Best,
>> Tal
>
> Achim Zeileis wrote:
>> Re: more mature. arm's coefplot() is more flexible in certain  
>> respects, mine is more convenient in others. The overlay  
>> functionality is something arm's coefplot() is better in and it  
>> also as some further options (vertical vs. horizontal etc.). My  
>> coefplot() has the advantage that it does not need any modification  
>> as long as coef() and vcov() methods are available. Furthermore,  
>> "level" can specify the significance level (instead of always using  
>> one and two standard errors, respectively).
>> But it shouldn't be too hard to create a superset of all options.
>
>
> @Tal:
> For the example using library(arm) and the Mroz data, you posted the  
> wrong image.  And loose the intercept in the example.
>
> @Achim:
> It would be worthwhile combining the generality of your version with  
> the
> overlay capability of the arm version, which is extremely useful for  
> model comparison.  However, the arm version uses S4 methods.

To my reading coefplot <somehow> collects parameters from a list of  
model objects using S4 methods, but then passes these to  
coefplot.default which uses base graphics. There seems to be an  
implicit loop, ... perhaps some sort of S4 magic? ... that accumulates  
like-named coefficients in a .local(...) (function?) object until they  
all get reduced to class "numeric", at which point they are passed to   
coefplot.default() which does not appear to be an S4 method.

(I am not particularly knowledgeable about S4 functions and  
dispatching, so any corrections or applifications to this account  
would be welcome.)

-- 
David.


>
> -Michael
>
>
> -- 
> Michael Friendly     Email: friendly AT yorku DOT ca
> Professor, Psychology Dept.
> York University      Voice: 416 736-5115 x66249 Fax: 416 736-5814
> 4700 Keele Street    Web:   http://www.datavis.ca
> Toronto, ONT  M3J 1P3 CANADA
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list