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 1.466907e-05 
#> ... New best solution
#> ... Procrustes: rmse 0.1013861  max resid 0.2439043 
#> Run 2 stress 8.769836e-05 
#> ... Procrustes: rmse 0.03703487  max resid 0.08854904 
#> Run 3 stress 0.004165126 
#> Run 4 stress 0 
#> ... New best solution
#> ... Procrustes: rmse 0.03855667  max resid 0.09147319 
#> Run 5 stress 0 
#> ... Procrustes: rmse 0.05338103  max resid 0.1381518 
#> Run 6 stress 8.19578e-05 
#> ... Procrustes: rmse 0.1518665  max resid 0.3255942 
#> Run 7 stress 0.001640053 
#> Run 8 stress 0 
#> ... Procrustes: rmse 0.05479433  max resid 0.1269638 
#> Run 9 stress 0.0003911527 
#> ... Procrustes: rmse 0.1332422  max resid 0.3250677 
#> Run 10 stress 0.05797334 
#> Run 11 stress 0 
#> ... Procrustes: rmse 0.1327785  max resid 0.3018827 
#> Run 12 stress 8.820044e-05 
#> ... Procrustes: rmse 0.0220441  max resid 0.05008114 
#> Run 13 stress 9.84104e-05 
#> ... Procrustes: rmse 0.1357786  max resid 0.2831029 
#> Run 14 stress 0.00268514 
#> Run 15 stress 0.0486347 
#> Run 16 stress 9.987608e-05 
#> ... Procrustes: rmse 0.05424793  max resid 0.1583581 
#> Run 17 stress 0.042751 
#> Run 18 stress 1.847916e-05 
#> ... Procrustes: rmse 0.06464497  max resid 0.1532921 
#> Run 19 stress 6.875621e-05 
#> ... Procrustes: rmse 0.138447  max resid 0.3154074 
#> Run 20 stress 9.688858e-05 
#> ... Procrustes: rmse 0.04907303  max resid 0.1710118 
#> *** Best solution was not repeated -- monoMDS stopping criteria:
#>      6: no. of iterations >= maxit
#>     13: stress < smin
#>      1: 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 8.45528e-05 
#> ... New best solution
#> ... Procrustes: rmse 0.1149288  max resid 0.2794459 
#> Run 2 stress 0 
#> ... New best solution
#> ... Procrustes: rmse 0.0523586  max resid 0.1266343 
#> Run 3 stress 0.0004428903 
#> ... Procrustes: rmse 0.05560114  max resid 0.1806574 
#> Run 4 stress 3.43748e-05 
#> ... Procrustes: rmse 0.04696447  max resid 0.1311468 
#> Run 5 stress 0.004104365 
#> Run 6 stress 9.898126e-05 
#> ... Procrustes: rmse 0.03306021  max resid 0.06085298 
#> Run 7 stress 0.0004019165 
#> ... Procrustes: rmse 0.1029445  max resid 0.2927876 
#> Run 8 stress 0.0590162 
#> Run 9 stress 0.000261955 
#> ... Procrustes: rmse 0.09829195  max resid 0.136617 
#> Run 10 stress 8.105593e-05 
#> ... Procrustes: rmse 0.04490103  max resid 0.1280056 
#> Run 11 stress 0.0008435532 
#> Run 12 stress 0.0002201946 
#> ... Procrustes: rmse 0.0624239  max resid 0.09528927 
#> Run 13 stress 9.47651e-05 
#> ... Procrustes: rmse 0.1379335  max resid 0.355345 
#> Run 14 stress 9.881733e-05 
#> ... Procrustes: rmse 0.1016692  max resid 0.2885338 
#> Run 15 stress 0.000285213 
#> ... Procrustes: rmse 0.1100588  max resid 0.2981109 
#> Run 16 stress 6.288697e-05 
#> ... Procrustes: rmse 0.1432157  max resid 0.3684405 
#> Run 17 stress 0.0002502776 
#> ... Procrustes: rmse 0.1058918  max resid 0.2957649 
#> Run 18 stress 0 
#> ... Procrustes: rmse 0.1473273  max resid 0.386913 
#> Run 19 stress 0 
#> ... Procrustes: rmse 0.1268899  max resid 0.3745752 
#> Run 20 stress 0 
#> ... Procrustes: rmse 0.1359374  max resid 0.3595656 
#> *** Best solution was not repeated -- monoMDS stopping criteria:
#>      9: no. of iterations >= maxit
#>     11: stress < smin
#> Warning: stress is (nearly) zero: you may have insufficient data
#> species scores not available

# }