View source: R/bootmds.pcops.R
bootmds.pcops | R Documentation |
Performs a bootstrap on an MDS solution. It works for derived dissimilarities only, i.e. generated by the call dist(data). The original data matrix needs to be provided, as well as the type of dissimilarity measure used to compute the input dissimilarities.
## S3 method for class 'pcops'
bootmds(
object,
data,
method.dat = "pearson",
nrep = 100,
alpha = 0.05,
verbose = FALSE,
...
)
object |
Object of class smacofP if used as method or another object inheriting from smacofB (needs to be called directly as bootmds.smacofP then). |
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". |
nrep |
Number of bootstrap replications. |
alpha |
Alpha level for condfidence ellipsoids. |
verbose |
If 'TRUE', bootstrap index is printed out. |
... |
Additional arguments needed for dissimilarity computation as specified in |
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. See bootmds
for more.
An object of class 'smacofboot', see bootmds
. With values
cov: Covariances for ellipse computation
bootconf: Configurations bootstrap samples
stressvec: Bootstrap stress values
bootci: Stress bootstrap percentile confidence interval
spp: Stress per point (based on stress.en)
stab: Stability coefficient
dats <- na.omit(PVQ40[,1:5])
diss <- dist(t(dats)) ## Euclidean distances
fit <- pcops(diss,loss="rstress",itmaxi=50) #this is just for illustration: increase itmaxi
set.seed(123)
resboot <- bootmds(fit, dats, method.dat = "euclidean", nrep = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.