[R] extract variables from linear model

Jörg Schaber schaber at molgen.mpg.de
Thu Jan 12 14:49:45 CET 2006


Hi,

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

Now I want to extract only the a * b effects with confidence intervals. 
Of course, I can just add the coefficients by hand, but I think there 
should an easier way.
I tried with predict.lm using the 'terms' argument, but I didn't manage 
to do it.
Any hints are appreciated,

best,

joerg




More information about the R-help mailing list