Learn R Programming

smacof (version 2.1-7)

confEllipse: Pseudo Confidence Ellipses

Description

Computes pseudo-confidence ellipses for symmetric and individual difference MDS fits.

Usage

# S3 method for smacofID
confEllipse(object)

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

Value

Returns an object belonging to classes "confell".

X

Configuration (group stimulus space for individual difference models)

h

Stress derivatives

s

Optimized stress (raw value)

Arguments

object

Object of class "smacofB" or "smacofID".

x

Object of class "confell"

eps

Perturbation region (e.g. 0.05 means that we look at a perturbation region where stress is at most 5% larger than the minimum we have found).

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.

...

Additional plotting arguments.

Details

The confEllipse function normalizes the dissimilarities and performs a few more iterations to optimize the configuration and the individual diffierence weights. This result is then passed to a function that computes the stress derivatives which are the basis of the ellipses in the plot function. This function works for ratio scaled versions only.

References

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. tools:::Rd_expr_doi("10.18637/jss.v102.i10")

See Also

plot.smacofboot

Examples

Run this code
## Simple ratio MDS fit 
delta <- sim2diss(cor(PVQ40agg))
res <- mds(delta, ndim = 3)
cres <- confEllipse(res)
plot(cres, plot.dim = c(1,2))
plot(cres, plot.dim = c(1,3))
plot(cres, plot.dim = c(2,3))


## INDSCAL on Helm data
fit1 <- indscal(helm)
cfit1 <- confEllipse(fit1)
plot(cfit1, ell = list(col = "gray", lty = 2), ylim = c(-0.04, 0.04))

## IDIOSCAL on Helm data
fit2 <- idioscal(helm)
cfit2 <- confEllipse(fit2)
plot(cfit1, ell = list(col = "gray", lty = 2), ylim = c(-0.04, 0.04))

Run the code above in your browser using DataLab