bootmds.smacofB: SMACOF Bootstrap

Description Usage Arguments Details Value References See Also Examples

View source: R/bootmds.smacofB.R

Description

Performs a bootstrap on a SMACOF solution. It works for derived dissimilarities only. The original data matrix needs to be provided, as well as the type of dissimilarity measure used to compute the input dissimilarities.

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'smacofB'
bootmds(object, data,  method.dat = "pearson", nrep = 100, 
alpha = 0.05, verbose = FALSE, ...)

## S3 method for class 'smacofboot'
plot(x, plot.dim = c(1,2), col = 1, 
label.conf = list(label = TRUE, pos = 3, cex = 0.8), 
ell = list(lty = 1, lwd = 1, col = "gray"), main, xlab, ylab, xlim, ylim, 
asp = 1, type = "p", pch = 20, ...)

Arguments

object

Object of class "smacofB", i.e., an MDS solution from mds().

data

Initial data (before dissimilarity computation).

method.dat

Dissimilarity computation used as MDS input. This must be one of "pearson", "spearman", "kendall", "euclidean", "maximum", "manhattan", "canberra", "binary". For unfolding models it is either "full" for full permutations or "rows" for permutations within rows.

nrep

Number of bootstrap replications.

alpha

Alpha level for confidence ellipsoids.

verbose

If TRUE, bootstrap index is printed out.

...

Additional arguments needed for dissimilarity computation as specified in sim2diss().

x

Object of class "smacofboot"

plot.dim

Vector with dimensions to be plotted.

col

Color for points.

label.conf

List with arguments for plotting the labels of the configurations in a configuration plot (logical value whether to plot labels or not, label position). If pos = 5 labels are placed away from the nearest point.

ell

List with arguments for plotting ellipses: line type, line width, color.

main

Plot title.

xlab

Label of x-axis.

ylab

Label of y-axis.

xlim

Scale x-axis.

ylim

Scale y-axis.

asp

Aspect ratio.

pch

Plotting symbol for object point.

type

Type of plot.

Details

In order to examine the stability solution of an MDS, a bootstrap on the raw data can be performed. This results in confidence ellipses in the configuration plot. The ellipses are returned as list which allows users to produce (and further customize) the plot by hand.

Value

cov

Covariances for ellipse computation

bootconf

Configurations bootstrap samples

stressvec

Bootstrap stress values

bootci

Stress bootstrap percentile confidence interval

stab

Stability coefficient

References

Jacoby, W. G., & Armstrong, D. A. (2014). Bootstrap confidence regions for multidimensional scaling solutions. American Journal of Political Science, 58, 264-278.

See Also

jackmds

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Example using Euclidean distances
data <- na.omit(PVQ40[,1:5])
diss <- dist(t(data))   ## Euclidean distances 
fit <- mds(diss)        ## 2D interval MDS

set.seed(123)
resboot <- bootmds(fit, data, method.dat = "euclidean", nrep = 50)
resboot
plot(resboot)

## Example using Pearson correlations 
sim <- cor(data)
diss <- sim2diss(sim, method = 1)  ## subtract from 1 (method needs to be passed to bootmds)
fit <- mds(diss, type = "ratio", ndim = 3)        ## 3D ratio MDS

set.seed(123)
resboot <- bootmds(fit, data, method.dat = "pearson", nrep = 50, alpha = 0.1, method = 1)
resboot
## plot 1st against 3rd dimension
ellipses <- plot(resboot, plot.dim = c(1,3), ell = list(lty = 2, col = "gray", lwd = 0.8))
str(ellipses)  ## list of ellipse coordinates for each object

smacof documentation built on Feb. 11, 2021, 3 a.m.