View source: R/permtest.smacof.R
permtest | R Documentation |
These methods perform a permutation test for a symmetric or an unfolding SMACOF model.
## S3 method for class 'smacof' permtest(object, data, method.dat = "pearson", nrep = 100, verbose = TRUE, ...) ## S3 method for class 'smacofR' permtest(object, data = NULL, method.dat = "rows", nrep = 100, verbose = TRUE, ...) ## S3 method for class 'smacofPerm' plot(x, alpha = 0.05, main, xlab, ylab, ...)
object |
Object of class |
data |
Optional argument; if provided permutations are performed on the data matrix (see details; ignored for unfolding models) |
method.dat |
If data are provided, this must be one of |
nrep |
Number of permutations |
verbose |
If |
x |
Object of class |
alpha |
Alpha level |
main |
Plot title. |
xlab |
Label of x-axis. |
ylab |
Label of y-axis. |
... |
additional plot arguments for plot function; additional arguments to be passed to |
This routine permutes m dissimilarity values, where m is the number of lower diagonal elements in the corresponding dissimilarity matrix. For each sample a symmetric, nonmetric SMACOF of dimension ndim
is computed and the stress values are stored in stressvec
. Using the fitted stress value, the p-value is computed. Subsequently, the empirical cumulative distribution function can be plotted using the plot method.
If the MDS fit provided on derived proximities of a data matrix, this matrix can be passed to the permtest
function. Consequently, the data
matrix is subject to permutations. The proximity measure used for MDS fit has to match the one used for the permutation test. If a correlation
similarity is provided, it is converted internally into a dissimilarity using sim2diss
with corresponding arguments passed to the
...
argument.
stressvec |
Vector containing the stress values of the permutation samples |
stress.obs |
Stress (observed sample) |
pval |
Resulting p-value |
call |
Model call |
nrep |
Number of permutations |
nobj |
Number of objects |
Patrick Mair and Ingwer Borg
Mair, P., Borg, I., and Rusch, T. (2016). Goodness-of-fit assessment in multidimensional scaling and unfolding. Multivariate Behavioral Research, 51, 772-789. doi: 10.1080/00273171.2016.1235966
Mair, P, Groenen, P. J. F., De Leeuw, J. (2022). More on multidimensional scaling in R: smacof version 2, Journal of Statistical Software, 102(10), 1-47. doi: 10.18637/jss.v102.i10
jackmds
, bootmds
## permuting the dissimilarity matrix (full) data(kinshipdelta) fitkin <- mds(kinshipdelta, ndim = 2, type = "interval") set.seed(222) res.perm <- permtest(fitkin) res.perm plot(res.perm) ## permuting the data matrix GOPdtm[GOPdtm > 1] <- 1 ## use binary version diss1 <- dist(t(GOPdtm[,1:10]), method = "binary") ## Jaccard distance fitgop1 <- mds(diss1, type = "ordinal") fitgop1 set.seed(123) permtest(fitgop1, GOPdtm[,1:10], nrep = 10, method.dat = "binary") rmat <- cor(GOPdtm[,1:10], method = "kendall") ## Kendall correlation diss2 <- sim2diss(rmat, method = 1) fitgop2 <- mds(diss2, type = "ordinal") fitgop2 set.seed(123) permtest(fitgop2, GOPdtm[,1:10], nrep = 10, method.dat = "kendall", method = 1) ## unfolding permutation data(breakfast) res.unfolding <- unfolding(breakfast, ndim = 2) set.seed(123) permtest(res.unfolding, nrep = 20, method.dat = "rows")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.