Plots an NMDS of a matrix of 0s and 1s, the censoring indicator columns for multiple variables, to discern the pattern of data below vs. above the detection limit. With multiple detection limits within a column, re-censoring to the highest limit in the column must be done prior to running this function. May have different censoring levels in different columns.

binaryMDS(dat.frame, group = NULL, title = NULL, legend.pos = "bottomleft")

Arguments

dat.frame

A data frame containing only the columns of 0/1 values.

group

Optional grouping variable. Sites will be represented by different colored symbols for each group.

title

Optional title for the NMDS graph.

legend.pos

When group is specified, determines the location of the legend on the graph showing the colors representing each group’s data. Default is “bottomleft”. Alternatives are “topright” and “centerleft”, etc.

Value

Plots an NMDS of censored data represented as the binary Above vs Below a detection limit for each parameter.

Details

Binary data may not provide sufficient information to discern differences in location on the plot if sample size is small. Prior to running this analysis it is suggested to consult best analysis practice when performing NMDS. As a rule of thumb, an NMDS ordination with a stress value around or above 0.2 is deemed suspect and a stress value approaching 0.3 indicates that the ordination is arbitrary. Stress values equal to or below 0.1 are considered fair, while values equal to or below 0.05 indicate good fit.

References

Helsel, D.R., 2011. Statistics for Censored Environmental Data using Minitab and R, 2nd ed. John Wiley & Sons, USA, N.J.

See also

Examples

# \donttest{
data(PbHeron)

# without group specified
binaryMDS(PbHeron[,4:15])
#> Run 0 stress 9.202781e-05 
#> Run 1 stress 8.454041e-05 
#> ... New best solution
#> ... Procrustes: rmse 0.08339629  max resid 0.2406127 
#> Run 2 stress 3.291748e-05 
#> ... New best solution
#> ... Procrustes: rmse 0.06119226  max resid 0.1413517 
#> Run 3 stress 0.002383588 
#> Run 4 stress 0.001365952 
#> Run 5 stress 0.003457604 
#> Run 6 stress 7.255049e-05 
#> ... Procrustes: rmse 0.05516073  max resid 0.1398394 
#> Run 7 stress 0.0557419 
#> Run 8 stress 0.05574194 
#> Run 9 stress 0.0005622559 
#> Run 10 stress 0 
#> ... New best solution
#> ... Procrustes: rmse 0.01665327  max resid 0.05131048 
#> Run 11 stress 9.166887e-05 
#> ... Procrustes: rmse 0.05112416  max resid 0.1505606 
#> Run 12 stress 0 
#> ... Procrustes: rmse 0.03985622  max resid 0.1387232 
#> Run 13 stress 0.05797323 
#> Run 14 stress 6.436378e-05 
#> ... Procrustes: rmse 0.01130367  max resid 0.02073597 
#> Run 15 stress 0.0006326231 
#> Run 16 stress 0.0700209 
#> Run 17 stress 9.788295e-05 
#> ... Procrustes: rmse 0.1308235  max resid 0.303749 
#> Run 18 stress 0.0004467786 
#> ... Procrustes: rmse 0.1201635  max resid 0.3022219 
#> Run 19 stress 7.763769e-05 
#> ... Procrustes: rmse 0.1111397  max resid 0.3169961 
#> Run 20 stress 0.002357685 
#> *** Best solution was not repeated -- monoMDS stopping criteria:
#>      7: no. of iterations >= maxit
#>      9: stress < smin
#>      4: stress ratio > sratmax
#> Warning: stress is (nearly) zero: you may have insufficient data
#> species scores not available


# With Group argument
binaryMDS(PbHeron[,4:15],group=PbHeron$DosageGroup)
#> Run 0 stress 9.202781e-05 
#> Run 1 stress 5.729706e-05 
#> ... New best solution
#> ... Procrustes: rmse 0.08158103  max resid 0.2212565 
#> Run 2 stress 9.151599e-05 
#> ... Procrustes: rmse 0.1340991  max resid 0.3593923 
#> Run 3 stress 5.589054e-05 
#> ... New best solution
#> ... Procrustes: rmse 0.1409506  max resid 0.3694032 
#> Run 4 stress 7.802855e-05 
#> ... Procrustes: rmse 0.06486893  max resid 0.1592637 
#> Run 5 stress 0.06925871 
#> Run 6 stress 0.04183233 
#> Run 7 stress 0.0006688247 
#> Run 8 stress 0.07573106 
#> Run 9 stress 0.0003572154 
#> ... Procrustes: rmse 0.1099225  max resid 0.2836685 
#> Run 10 stress 9.581388e-05 
#> ... Procrustes: rmse 0.06334156  max resid 0.2194986 
#> Run 11 stress 0.0001673226 
#> ... Procrustes: rmse 0.06885748  max resid 0.1724581 
#> Run 12 stress 0.0007166791 
#> Run 13 stress 0 
#> ... New best solution
#> ... Procrustes: rmse 0.04452555  max resid 0.1266959 
#> Run 14 stress 2.452023e-05 
#> ... Procrustes: rmse 0.1435376  max resid 0.3727563 
#> Run 15 stress 9.05722e-05 
#> ... Procrustes: rmse 0.1176455  max resid 0.3508205 
#> Run 16 stress 0.0009799021 
#> Run 17 stress 0 
#> ... Procrustes: rmse 0.03775872  max resid 0.08106535 
#> Run 18 stress 0 
#> ... Procrustes: rmse 0.02430448  max resid 0.04657197 
#> Run 19 stress 7.822003e-05 
#> ... Procrustes: rmse 0.03858797  max resid 0.1147788 
#> Run 20 stress 0.08417885 
#> *** Best solution was not repeated -- monoMDS stopping criteria:
#>      6: no. of iterations >= maxit
#>     11: stress < smin
#>      3: stress ratio > sratmax
#> Warning: stress is (nearly) zero: you may have insufficient data
#> species scores not available

# }