[R] how to extrac one coef from lm at a time
tlumley at u.washington.edu
Tue May 21 18:17:14 CEST 2002
On Tue, 21 May 2002, Jonathan Baron wrote:
> On 05/21/02 12:07, Antonio Olinto wrote:
> >How to extract the elevation and the slope values from a linear model (lm)
> >coef(model.lm) gives both of them.
> One way is
> for the intercept
> for the slope of the first predictor, and so on.
are preferred -- the point of accessor functions like coef() is to hide
the inner structure of the model object. For coef() it doesn't matter a
lot, but there are plenty of models for which model$resid is not the same
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help