Description Usage Arguments Details Value Note Author(s) See Also Examples
Functions refit results of constrained ordination (cca
,
rda
, capscale
) as a multiple response
linear model (lm
). This allows finding influence
statistics (influence.measures
). This also allows
deriving several other statistics, but most of these are biased and
misleading, since refitting ignores a major component of variation in
constrained ordination.
1 | as.mlm(x)
|
x |
Constrained ordination result. |
Popular algorithm for constrained ordination is based on iteration
with regression where weighted averages of sites are used as dependent
variables and constraints as independent variables.
Statistics of linear regression
are a natural by-product in this algorithm. Constrained ordination in
vegan uses different algorithm, but to obtain linear regression
statistics you can refit an ordination result as a multiple response
linear model (lm
). This regression ignores residual
unconstrained variation in the data, and therefore estimates of
standard error are strongly biased and much too low. You can get
statistics like t-values of coefficients, but you should not use
these because of this bias. Some useful information you can get with
refitted models are statistics for detecting influential observations
(influence.measures
including
cooks.distance
, hatvalues
).
Function returns an object of multiple response linear model of class
"mlm"
documented with lm
.
You can use these functions to find t-values of coefficients
using summary.mlm
, but you should not do this because the
method ignores unconstrained residual variation. You also can find
several other statistics for (multiple response) linear models with
similar bias. This bias is not a unique feature in vegan
implementation, but also applies to implementations in other
software.
Some statistics of linear models can be found without using
these functions: coef.cca
gives the regression
coefficients, spenvcor
the species-environment
correlation, intersetcor
the interset correlation,
vif.cca
the variance inflation factors.
Jari Oksanen
cca
, rda
, capscale
,
cca.object
, lm
, summary.mlm
,
influence.measures
.
1 2 3 4 5 6 7 8 9 10 11 12 | data(varespec)
data(varechem)
mod <- cca(varespec ~ Al + P + K, data=varechem)
lmod <- as.mlm(mod)
## Coefficients
lmod
coef(mod)
## Influential observations
influence.measures(lmod)
plot(mod, type = "n")
points(mod, cex = 10*hatvalues(lmod), pch=16, xpd = TRUE)
text(mod, display = "bp", col = "blue")
|
Loading required package: permute
Loading required package: lattice
This is vegan 2.5-4
Warning message:
'as.mlm' is deprecated.
Use 'see ?hatvalues.cca for new alternatives' instead.
See help("Deprecated")
Call:
lm(formula = WA ~ ., data = X, weights = w)
Coefficients:
CCA1 CCA2 CCA3
(Intercept) -1.364e-16 1.298e-16 2.909e-16
Al 7.479e-03 -1.884e-03 3.381e-03
P -6.491e-03 -1.022e-01 -2.231e-02
K -6.756e-03 1.534e-02 1.707e-02
CCA1 CCA2 CCA3
Al 0.007478556 -0.001883637 0.003380774
P -0.006491081 -0.102189737 -0.022306682
K -0.006755568 0.015343662 0.017067351
Influence measures of
lm(formula = WA ~ ., data = X, weights = w) :
dfb.1_ dfb.Al dfb.P dfb.K CCA1 CCA2 CCA3 cov.r
18 0.29810 -0.255305 0.00992 -0.06408 0.40781 0.2688 -0.176741 0.00805
15 -0.18825 0.101295 0.14064 -0.11951 -0.25218 -0.1425 0.010516 0.01045
24 -0.28878 -0.003523 -0.45031 0.21238 -0.57120 -0.2072 -0.308800 0.00960
27 -0.06494 0.074353 -0.01770 -0.03647 -0.12401 -0.2040 0.027117 0.01426
23 0.12010 -0.118311 0.07005 -0.02583 0.18926 0.3833 -0.289598 0.01201
19 0.01897 -0.007462 -0.01180 0.01090 0.02342 -0.3989 -0.000717 0.01232
22 -0.13652 0.155052 0.15252 -0.13450 -0.25070 0.4673 0.206913 0.01287
16 -0.16882 0.109056 0.18167 -0.10065 -0.27346 0.2903 0.250839 0.01121
28 -0.31694 0.344951 -0.35723 -0.05623 -0.77163 0.0845 0.707320 0.01164
13 0.37299 0.421402 -1.15819 1.42065 1.58279 0.4848 0.327464 0.04124
14 -0.05322 0.024374 0.02536 -0.01172 -0.06449 0.2666 0.095880 0.01212
20 -0.00544 0.000749 -0.00561 0.00206 -0.00857 0.3807 -0.246898 0.01254
25 -0.16251 0.169698 -0.11245 0.09507 -0.26813 -0.2082 -0.090535 0.01155
7 -0.31124 -0.408929 0.16214 0.16126 -0.68366 0.6756 -0.969451 0.01028
5 0.37506 -0.287253 -0.09355 -0.36540 0.84290 0.4232 -0.374102 0.00831
6 0.01668 0.003281 -0.00173 -0.01594 0.03142 0.4182 0.243918 0.01398
3 -0.21235 -0.312389 -0.08137 0.26748 -0.48208 -0.3178 0.615865 0.01288
4 -0.02435 -0.059559 -0.02785 0.00891 -0.07227 0.8919 0.142503 0.01692
2 0.01444 0.021023 0.00430 -0.00385 0.02565 -0.5189 -0.200173 0.01386
9 0.09453 0.076663 0.09866 -0.11215 0.16179 -0.4431 0.820408 0.01333
12 0.32483 -0.100807 -0.21465 0.04778 0.43890 -1.0115 0.414212 0.00874
10 0.75838 0.156020 0.69648 -0.13570 1.20348 -0.3381 0.000769 0.00250
11 0.01686 0.015066 0.00709 0.00108 0.02587 0.2486 -0.407255 0.01315
21 -0.16486 0.151470 0.15801 -0.02979 -0.30670 -0.2293 -0.385998 0.01213
CCA1.1 CCA2.1 CCA3.1 hat inf
18 1.22e-02 0.005316 2.30e-03 0.0690
15 5.00e-03 0.001595 8.69e-06 0.0667
24 2.45e-02 0.003224 7.16e-03 0.1525
27 1.26e-03 0.003413 6.03e-05 0.1894
23 2.89e-03 0.011865 6.77e-03 0.0929
19 4.51e-05 0.013083 4.23e-08 0.0512
22 5.08e-03 0.017638 3.46e-03 0.1531
16 5.93e-03 0.006683 4.99e-03 0.0961
28 4.52e-02 0.000542 3.80e-02 0.2714
13 1.98e-01 0.018551 8.47e-03 0.7589 *
14 3.41e-04 0.005822 7.53e-04 0.0496
20 6.04e-06 0.011917 5.01e-03 0.0658
25 5.73e-03 0.003455 6.53e-04 0.1059
7 3.51e-02 0.034299 7.06e-02 0.2063
5 5.07e-02 0.012793 1.00e-02 0.1980
6 8.12e-05 0.014379 4.89e-03 0.1628
3 1.84e-02 0.007978 3.00e-02 0.2274
4 4.29e-04 0.065381 1.67e-03 0.3092
2 5.41e-05 0.022141 3.30e-03 0.1556
9 2.14e-03 0.016020 5.49e-02 0.1486
12 1.44e-02 0.076367 1.28e-02 0.0905 *
10 7.83e-02 0.006177 3.19e-08 0.1275 *
11 5.50e-05 0.005081 1.36e-02 0.1098
21 7.51e-03 0.004198 1.19e-02 0.1420
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.