recip_nmds: Reciprocal NMDS

Description Usage Arguments Details Value References See Also Examples

Description

Reciprocal nonmetric multidimensional scaling (NMDS) to estimate external exchangeability of two datasets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
recip_nmds(tw, method = "bray", zeroadj = TRUE, step = TRUE, k = 2,
  ...)

## S3 method for class 'recip_nmds'
summary(object, ...)

## S3 method for class 'recip_nmds'
plot(x, type = "points", leg = FALSE,
  noaxes = TRUE, ...)

plot_marg_grp(object, ...)

plot_axismatch(object, ...)

Arguments

tw

list of species and environment matrices, of class ‘twin’

method

dissimilarity index, per vegdist

zeroadj

default TRUE: adjust dissimilarities to account for zero-sum rows?

step

default TRUE: use shortest-path stepacross dissimilarity adjustment?

k

number of dimensions sought in final NMDS solution

...

additional arguments passed to function

x, object

result from recip_nmds

type

for plotting, one of 'points', 'text', or 'twin'

leg

logical, should legend be plotted?

noaxes

default TRUE: cleanly plot without axes?

Details

Reciprocal NMDS with recip_nmds estimates external exchangeability of two candidate datasets. The premise of reciprocal NMDS is to calibrate each of two models with each respective dataset, mutually exchanging datasets among the alternative ordination models, then determining how well each dataset fit the alternative model. This is really just a special case of 2-fold cross-validation as applied to NMDS. The primary use of reciprocal NMDS is to test the null hypothesis that two multivariate datasets are exchangeable.

Value

List of class ‘recip_nmds’ with elements:

m1:

Reciprocal model 1, calibrated with dataset 1 then swapping in dataset 2.)

m2:

Reciprocal model 2, calibrated with dataset 2 then swapping in dataset 1.)

grp:

Vector identifying group membership in dataset 1 or 2.

sumtab:

data.frame summary table, with elements:

d1_rP, d2_rP

Partial intermodel fit for group 1, group 2 data (i.e., how well each dataset fits the opposing calibration model).

rP_external

Complete intermodel fit (degree of overall external exchangebility among the two datasets, measured as Procrustean agreement of the two reciprocal models).

stress1, stress2

Respective stress of models 1,2.

varexp1, varexp2

Respective variance explained of models 1,2.

References

Kruskal, J. B. 1964. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika 29: 1-27.

See Also

resamp_nmds for resampled NMDS, and nearestspecies to force same number of rows among candidate datasets.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# prepare two candidate datasets (here we just modify one)
set.seed(231)
data(smoky)
spe1 <- smoky$spe
env1 <- env2 <- smoky$env
spe2 <- spe1 + abs(rnorm(prod(dim(spe1)), 0, 2))  # add noise
tw   <- twin(spe1, spe2, env1, env2)

# reciprocal NMDS
r <- recip_nmds(tw)
summary(r)
plot(r)
plot(r, 'text')
plot(r, 'twin')
plot_marg_grp(r)
plot_axismatch(r)
plot_axismatch(r, ann=FALSE)

phytomosaic/fitNMDS documentation built on May 17, 2019, 8:19 p.m.