pcnm(dis, threshold, w, dist.ret = FALSE)
dis
.scores
function. The default is to return all PCNM vectors,
but argument choices
selects the given vectors.threshold
are replaced with arbitrary value of four times the
threshold. String "pcnm"
is added to the method
attribute, and new attribute threshold
is added to the
distances. This is returned only when dist.ret = TRUE
.rda
, cca
and
capscale
) or univariate regression (lm
)
together with environmental variables (row weights should be supplied
with cca
; see Examples). This is regarded as a more
powerful method than forcing rectangular environmental data into
distances and using them in partial mantel analysis
(mantel.partial
) together with geographic distances
(Legendre et al. 2008, but see Tuomisto & Ruokolainen 2008).
The function is based on pcnm
function in Dray's unreleased
spantree
as an internal support
function. The current function also can use prior weights for rows by
using weighted metric scaling of wcmdscale
. The use of
row weights allows finding orthonormal PCNMs also for correspondence
analysis (e.g., cca
).spantree
.## Example from Borcard & Legendre (2002)
data(mite.xy)
pcnm1 <- pcnm(dist(mite.xy))
op <- par(mfrow=c(1,3))
## Map of PCNMs in the sample plot
ordisurf(mite.xy, scores(pcnm1, choi=1), bubble = 4, main = "PCNM 1")
ordisurf(mite.xy, scores(pcnm1, choi=2), bubble = 4, main = "PCNM 2")
ordisurf(mite.xy, scores(pcnm1, choi=3), bubble = 4, main = "PCNM 3")
par(op)
## Plot first PCNMs against each other
ordisplom(pcnm1, choices=1:4)
## Weighted PCNM for CCA
data(mite)
rs <- rowSums(mite)/sum(mite)
pcnmw <- pcnm(dist(mite.xy), w = rs)
ord <- cca(mite ~ scores(pcnmw))
## Multiscale ordination: residual variance should have no distance
## trend
msoplot(mso(ord, mite.xy))
Run the code above in your browser using DataLab