"lm"
"mlm"
"mlm"
class is for multiple response models.
This class of objects is returned from the
lm
function
to represent a fitted linear model.
The
"lm"
class of objects has methods for the following generic
functions:
add1
,
alias
, all.equal,
anova
,
coef
,
deviance
,
drop1
,
dummy.coef
,
effects
,
family
,
formula
,
kappa
,
labels
,
model.frame
,
model.matrix
,
multicomp
,
plot
,
predict
,
print
,
print.summary
,
proj
,
residuals
, step,
summary
,
tabPlot
,
tabPredict
,
tabSummary
.
The generic functions that have methods for
"mlm"
are:
alias
,
coef
,
predict
,
print
,
summary
.
The class
"mlm"
inherits from
"lm"
.
Some of the fitted model objects inherit from
"lm"
and/or
"mlm"
.
These include:
"aov"
,
"glm"
,
"gam"
(which inherits from
"glm"
).
The following components must be included in a legitimate
lm
object.
singular.ok
was true, there will
be missing values in the coefficients corresponding to inestimable
coefficients.
residuals
function with
type="pearson"
.
"qr"
method, there will be as many of these as observations.
The first
rank
of them correspond to degrees of freedom in the model
and are named accordingly.
method=qr
, this is determined by the orthogonal decomposition
of the model matrix.
For other methods, it may be computed by other calculations, but note
that summary methods for
lm
objects assume the existence of this
component. If it is not computed, the methods will fail.
R
, columns of
R
will have
been pivoted, and missing values inserted in the coefficients.
The upper-left
rank
rows and columns of
R
are the nonsingular
part of the fit, and the remaining columns of the first
rank
rows
give the aliasing information (see
alias
).
i
th element of the list is the vector saying which coefficients
correspond to the
i
th term.
It may be of length 0 if there were no estimable effects for the term.
See also
R.assign
below.
expression
and class
term
summarizing the formula.
Used by various methods, but typically not of direct relevance to users.
r
columns of the
R
matrix
define the full-rank part of the model.
The
R.assign
vector acts like
assign
, but defines the terms
relative to the columns of
R
, unlike
assign
which defines them in
terms of columns of the original model matrix.
qr
decomposition object. See
qr
for its
structure.
This depends on using method
"qr"
, and the
qr
argument.
model=T
.
x=T
.
y=T
.
"mlm"
,
and the coefficients, effects, fitted values, and residuals are all
matrices whose columns correspond to the response variables.
The residuals, fitted values, coefficients, and effects may be extracted
by the generic functions of the same name, rather than
by the
$
operator.
For pure
lm
objects this is less critical
than for some of the inheritor classes.
Note that the extractor function
coef
returns a vector with missing values
omitted.