[R] how to extrac one coef from lm at a time
o.christensen at lancaster.ac.uk
Tue May 21 17:38:47 CEST 2002
x <- 1:5
parms <- coef(lm(c(1:3,7,6) ~ x))
parms is the intercept
parms is the slope
Antonio Olinto wrote:
> Hello R-Users,
> I have I simple question that I could not solve:
> How to extract the elevation and the slope values from a linear model (lm)
> coef(model.lm) gives both of them.
> Antonio Olinto
> 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
Ole F. Christensen
Department of Mathematics and Statistics
Fylde College, Lancaster University
Lancaster, LA1 4YF, England
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