I am only looking for the linear coefficient value of model B1 (newx), not the name. I just want a value of 0.5. I do not need the name "newx".
newx <- c(0.5,1.5.2.5) newy <- c(2,3,4) out <- lm(newy ~ newx)
out as follows:
Call: lm(formula = newy ~ newx) Coefficients: (Intercept) newx 1.5 1.0
I came here. But now I'm stuck.
out$coefficients["newx"] newx 1.0
vector r named lm
Andre Mikulec Apr 01 '13 at 2:05 am
source share