[R] extract variables from linear model

jruohonen jruoho at gmx.net
Thu Jan 12 15:18:23 CET 2006


> I fitted a linear model:
> fit <- lm(y ~ a * b + c - 1 , na.action='na.omit')

wouldn't a simple 

coef(fit)[2] 

work?

Jukka Ruohonen.

> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html




More information about the R-help mailing list