aovlist
,
lm
.
proj(object, onedf=T)
lm
or any object that inherits from class
lm
.
It will run faster if the object contains either a
qr
component or a
proj
component.
TRUE
(the default for objects of
class
lm
), the function returns a matrix of single-degree-of-freedom projections of the response variable onto the columns of the
predictor matrix. The default method does not use this argument.
When
FALSE
, an option available in
proj.lm
and the default for objects
of class
aov
, the function
collapses the single degree of freedom projections into multi-degree-of-freedom
projections. Each column of the collapsed result represents one term of the
analysis of variance table. The sum of squares of each column is the sum of
squares for the corresponding term in the model formula, with degrees of
freedom given by the
df
attribute of the result. The formula itself
is returned in the
formula
attribute.
onedf
attribute returns the value of the
onedf
argument.
The method for
lm
objects appends a column of residuals. The method for
aovlist
objects returns a list of projection matrices, one for each stratum
in the design.
If the fitted model does not contain a
qr
component (which defines
the numeric decomposition used in the fitting), it will be necessary to refit.
Therefore, if you know in advance that you want projections, it saves
some time to add
qr=T
to the original call.
lm.object <- lm(cost ~ age + type + car.age, claims) tmp <- proj(lm.object) gunaov.qr <- aov(Rounds ~ Method + Physique/Team, gun, qr = T) gunaov.proj <- proj(gunaov.qr)