Last chance! 50% off unlimited learning
Sale ends in
"lm"
and "glm"
.effects(object, …)# S3 method for lm
effects(object, set.sign = FALSE, …)
lm
.TRUE
, the sign of the effects
corresponding to coefficients in the model will be set to agree with the
signs of the corresponding coefficients, otherwise the sign is
arbitrary.residuals
, or a matrix if there were multiple responses
in the fitted model, in either case of class "coef"
. The first lm
or aov
,
the effects are the uncorrelated single-degree-of-freedom values
obtained by projecting the data onto the successive orthogonal
subspaces generated by the QR decomposition during the fitting
process. The first coef
y <- c(1:3, 7, 5)
x <- c(1:3, 6:7)
( ee <- effects(lm(y ~ x)) )
c( round(ee - effects(lm(y+10 ~ I(x-3.8))), 3) )
# just the first is different
Run the code above in your browser using DataLab