workhose functions for fitting multivariate linear models
manylm.fit.Rd
These are the workhorse functions called by manylm
used
to fit multivariate linear models. These should usually not be used
directly unless by experienced users.
Usage
manylm.fit(x, y, offset = NULL, tol=1.0e-010, singular.ok = TRUE, ...)
manylm.wfit(x, y, w, offset = NULL, tol=1.0e-010, singular.ok = TRUE, ...)
Arguments
- x
design matrix of dimension
n * p
.- y
matrix or an
mvabund
object of observations of dimensionn*q
.- w
vector of weights (length
n
) to be used in the fitting process for themanylm.wfit
functions. Weighted least squares is used with weightsw
, i.e.,sum(w * e^2)
is minimized.- offset
numeric of length
n
). This can be used to specify an a priori known component to be included in the linear predictor during fitting.- tol
tolerance for the
qr
decomposition. Default is 1.0e-050.- singular.ok
logical. If
FALSE
, a singular model is an error.- ...
currently disregarded.
Value
a list with components
- coefficients
p
vector- residuals
n
vector or matrix- fitted.values
n
vector or matrix
- weights
n
vector --- only for the*wfit*
functions.- rank
integer, giving the rank
- qr
(not null fits) the QR decomposition.
- df.residual
degrees of freedom of residuals
- hat.X
the hat matrix.
- txX
the matrix
(t(x)%*%x)
.