search for: ftr3

Displaying 1 result from an estimated 1 matches for "ftr3".

Did you mean: ftr
2003 Aug 23
1
explanation of lm's coefficients
...lt;-as.factor(rep(1:3,each=10)) fit<-lm(data ~ ftr) the mean values of the three facotrs from the data: c(mean(data[1:10]), mean(data[11:20]), mean(data[21:30])) [1] -0.3589049 0.6034931 -0.7256897 are not the same as the coefficients return from fit: fit$coef (Intercept) ftr2 ftr3 -0.3589049 0.9623980 -0.3667847 ftr2 and ftr3 are offset by the value of the intercept. The fitted values are as I expected: fit$fitted.values 1 2 3 4 5 6 7 -0.3589049 -0.3589049 -0.3589049 -0.3589049 -0.3589049 -0.3589049 -0.358...