bdVector
or matrix of uncorrelated effects.
Methods
for more information. Method functions can be written to handle specific classes of data. Classes that already have methods for this function include
"lm"
and
"bdLm"
.
effects(object)
lm
,
bdLm
, or another fitting function. Any object with a component named
"effects"
can be given as the
object
argument.
Suppose there are
n
observations and
p
coefficients in the model.
With the default QR fitting algorithm, there will be
max(n,p)
effects, some of which are equal to
0
. Some linear model algorithms (e.g., Choleski, SVD) produce only
min(n,p)
effects.
If the rank of the model matrix is
r
, the first
r
effects are associated with the estimable coefficients and the rest with residuals.
Note that this involves pivoting of values in the case of rank-deficient models. Pivoted or not, the effects associated with the
p
coefficients are labeled appropriately.
If
r < p
, some effects may equal
0
. The last
n-p
effects are unlabeled, not being associated with specific degrees of freedom in the model or with specific observations.
If the response in the regression has multiple columns, there is one column of effects for each column of the response, and effects are correlated across columns.
In the case of models like
glm
,
bdGlm
, or
gam
, the effects are those of the underlying weighted linear model.
# Create a sample fitted object. fuel.fit <- lm(Fuel ~ Weight + Disp., data=fuel.frame) effects(fuel.fit)