[R] linear model coefficients by year and industry, fitted values, residuals, panel data

Rolf Turner rolf.turner at xtra.co.nz
Wed Apr 3 22:52:49 CEST 2013

On 04/04/2013 07:54 AM, Adams, Jean wrote:
> Peter.
> For suggestion 1, what advantages are there to using coef() rather than
> $coef?

Just thought I'd chip in:  It is considered, uh, politically correct to use
extractor functions rather than digging out components of objects
in a "direct" manner.  The purported advantage of this is that it is
robust against package changes which could restructure the object
in question, which would break direct extraction but would (presumably)
have no deleterious consequences for the use of extractor functions.


         Rolf Turner

More information about the R-help mailing list