powered by
Creates random dissimilarity matrices (n objects), fits an MDS, and returns the stress values of each MDS fit.
randomstress(n, ndim, nrep = 100, type = c("ratio", "interval", "ordinal", "mspline"))
Number of objects
Number of dimensions for MDS
Number of random samples
MDS type
Returns a vector with stress values.
The random dissimilarities are drawn from a U(0,1) distribution.
Spence I., Ogilvie, J.C. (1973). A table of expected stress values for random rankings in nonmetric multidimensional scaling. Multivariate Behavioral Research, 8, 511-517.
# NOT RUN { ## 8 objects, 2 dimensions, interval MDS (50 replications) stressvec <- randomstress(n = 8, ndim = 2, nrep = 50, type = "interval") mean(stressvec) # }
Run the code above in your browser using DataLab