Description Usage Arguments Details Value Author(s) See Also Examples
manylm is used to fit multivariate linear models
to high-dimensional data, such as multivariate abundance data in ecology.
This is the base model-fitting function - see plot.manylm for
assumption checking, and anova.manylm or summary.manylm
for significance testing.
1 2 3 4 5 6 |
formula |
an object of class |
data |
an optional data frame, list or environment (or object
coercible by |
subset |
an optional vector specifying a subset of observations to be used in the fitting process. |
weights |
an optional vector of weights to be used in the fitting
process. Should be |
na.action |
a function which indicates what should happen
when the data contain |
method |
the method to be used; for fitting, currently only
|
model, x, y, qr |
logicals. If |
singular.ok |
logical. If |
contrasts |
an optional list. See the |
offset |
this can be used to specify an a priori
known component to be included in the linear predictor
during fitting. This should be |
test |
choice of test statistic. Can be one of "LR" (default) = likelihood ratio statistic "F" = Lawley-Hotelling trace statistic |
cor.type |
structure imposed on the estimated correlation matrix under the fitted model. Can be "I"(default), "shrink", or "R". See anova.manylm for details of its usage. This parameter will be used as the default value of |
shrink.param |
shrinkage parameter to be used if |
tol |
the tolerance used in estimations. |
... |
additional arguments to be passed to the low level regression fitting functions (see below). |
Models for manylm are specified symbolically. For details on this
compare the details section of lm and formula. If the formula
includes an offset, this is evaluated and subtracted from the
response.
See model.matrix for some further details. The terms in
the formula will be re-ordered so that main effects come first,
followed by the interactions, all second-order, all third-order and so
on: to avoid this pass a terms object as the formula (see
aov and demo(glm.vr) for an example).
A formula has an implied intercept term. To remove this use either
y ~ x - 1 or y ~ 0 + x. See formula for
more details of allowed formulae.
manylm calls the lower level function manylm.fit
or manylm.wfit for the actual numerical computations.
For programming only, you may consider doing likewise.
All of weights, subset and offset are evaluated
in the same way as variables in formula, that is first in
data and then in the environment of formula.
For details on arguments related to hypothesis testing (such as cor.type
and resample) see summary.manylm or
anova.manylm.
manylm returns an object of c("manylm", "mlm", "lm") for multivariate
formula response and of of class c("lm") for univariate response.
A manylm object is a list containing at least the following components:
coefficients |
a named matrix of coefficients |
residuals |
the residuals matrix, that is response minus fitted values. |
fitted.values |
the matrix of the fitted mean values. |
rank |
the numeric rank of the fitted linear model. |
weights |
(only for weighted fits) the specified weights. |
df.residual |
the residual degrees of freedom. |
hat.X |
the hat matrix. |
txX |
the matrix |
test |
the |
cor.type |
the |
resample |
the |
nBoot |
the |
call |
the matched call. |
terms |
the |
xlevels |
(only where relevant) a record of the levels of the factors used in fitting. |
model |
if requested (the default), the model frame used. |
offset |
the offset used (missing if none were used). |
y |
if requested, the response matrix used. |
x |
if requested, the model matrix used. |
In addition, non-null fits will have components assign and
(unless not requested) qr relating to the linear
fit, for use by extractor functions such as summary.manylm.
Yi Wang, Ulrike Naumann and David Warton <David.Warton@unsw.edu.au>.
anova.manylm, summary.manylm, plot.manylm
1 2 3 4 5 6 7 8 9 10 |
Call:
manylm(formula = spiddat ~ X)
Coefficients:
Alopacce Alopcune Alopfabr Arctlute Arctperi
(Intercept) 1.231267 -1.380086 2.393197 -1.141160 2.027234
Xsoil.dry -0.794355 0.749110 -0.879432 0.730493 -0.594573
Xbare.sand -0.134612 -0.169884 0.255664 0.159457 0.089462
Xfallen.leaves 0.099633 -0.051408 0.043434 -0.236105 0.047585
Xmoss 0.098816 -0.211830 -0.018714 -0.042750 -0.150472
Xherb.layer 0.214865 0.147603 0.039480 0.050233 -0.166885
Xreflection 0.459053 0.388217 0.046706 -0.096538 0.217172
Auloalbi Pardlugu Pardmont Pardnigr Pardpull
(Intercept) -1.103879 3.734407 -3.407564 -0.469123 -1.859186
Xsoil.dry 0.571479 -0.761781 1.256562 1.299666 1.562122
Xbare.sand 0.042262 -0.229075 0.009099 0.127535 -0.110245
Xfallen.leaves -0.228302 0.232496 -0.308228 -0.700012 -0.691232
Xmoss -0.231740 -0.200612 0.589305 -0.393534 -0.197432
Xherb.layer 0.467675 0.050538 0.290093 0.281785 0.352392
Xreflection -0.045856 -0.319179 0.153976 -0.239496 -0.026756
Trocterr Zoraspin
(Intercept) 1.441566 0.077075
Xsoil.dry 0.891209 1.034457
Xbare.sand -0.155567 0.283460
Xfallen.leaves -0.241817 -0.479958
Xmoss -0.385430 -0.134735
Xherb.layer 0.291045 0.263206
Xreflection -0.199446 -0.656028
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.