smacof (version 1.8-13)

Procrustes: Procrustean Similarity Transformations

Description

Solves the Procrustean problem of fitting one (MDS) configuration (testee) to another (target) MDS configuration.

Usage

Procrustes(X, Y)
"plot"(x, plot.type = "jointplot", plot.dim = c(1,2), main, xlab, ylab, xlim, ylim, asp = 1, pch = 20, col.X = "cadetblue", col.Y = "gray", col.Yhat = "coral1", label.conf = list(label = TRUE, pos = 3, cex = 0.8), arrows = TRUE, length = 0.10, ...)

Arguments

X
Target configuration
Y
Testee configuration
x
Object of class procr
plot.type
Either "jointplot" or "transplot"
plot.dim
Vector with dimensions to be plotted.
main
Plot title.
xlab
Label of x-axis.
ylab
Label of y-axis.
xlim
Scale x-axis.
ylim
Scale y-axis.
pch
Plot symbol.
asp
Aspect ratio.
col.X
Color target configuration.
col.Y
Color testess configuration.
col.Yhat
Color transformed configuration.
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, label color).
length
length of the edges of the arrow head (in inches).
arrows
For "transplot" only, whether arrows should be plotted or not
...
Additional plot arguments.

Value

Returns an object of class procr with:
X
Input target configuration
Y
Input testee configuration
Yhat
Procrustes transformed (fitted) configuration
translation
Translation vector
dilation
Dilation factor
rotation
Rotation-reflection matrix
confdistX
Configuration distances X
confdistY
Configuration distances Y
confdistYhat
Configuration distances of fitted configuration
congcoef
Congruence coefficient

Details

Y is going to be modified by finding an optimal dilation factor, an optimal translation and rotation for Y such that it is a similar as possible to X. X remains untouched.

References

Borg, I., & Groenen, P. J. F. (2005). Modern Multidimensional Scaling (2nd ed.). Springer.

Examples

Run this code
## artificial example:
X <- matrix(c(1, -1, -1, 1, 2, 2, -2, -2), ncol = 2)
Y <- matrix(c(0.07, 0.93, 1.93, 1.07, 2.62, 3.12, 1.38, 0.88), ncol = 2)
op <- par(mfrow = c(1,2))
plot(X[,1], X[,2], xlim = c(-3, 3), ylim = c(-2, 3.5), asp = 1, xlab = "", ylab = "")
rect(-1, -2, 1, 2)
points(Y[,1], Y[,2], xlim = c(-3, 3), col = "gray")
polygon(Y[,1], Y[,2], border = "gray")

fitp <- Procrustes(X, Y)
plot(fitp$Yhat[,1], fitp$Yhat[,2], col = "red", xlim = c(-3, 3), ylim = c(-2, 3.5), 
     asp = 1, xlab = "", ylab = "")
polygon(fitp$Yhat[,1], fitp$Yhat[,2], border = "red")
par(op)

## MDS example:
eastD <- sim2diss(EW_eng$east)
attr(eastD, "Labels") <- abbreviate(attr(eastD, "Labels"))
fit.east <- mds(eastD, type = "ordinal")
westD <- sim2diss(EW_eng$west)
attr(westD, "Labels") <- abbreviate(attr(westD, "Labels"))
fit.west <- mds(westD, type = "ordinal", init = torgerson(eastD))

fit.proc <- Procrustes(fit.east$conf, fit.west$conf)
fit.proc

## Configuration plots; Procrustes plots.
plot(fit.east, main = "MDS East Germany")   ## MDS plot East Germany
plot(fit.west, main = "MDS West Germany")   ## MDS plot West Germany

## Procrustes configurations (X and Yhat)
plot(fit.proc, ylim = c(-1, 1))     
legend("topleft", legend = c("East Germany", "West Germany"), 
       col = c("cadetblue", "coral1"), pch = 19)

## Procrustes transformations (Y and Yhat)
plot(fit.proc, plot.type = "transplot", length = 0.05, ylim = c(-1,1))  
legend("topleft", legend = c("West Germany (untransformed)", "West Germany (transformed)"), 
       col = c("gray", "coral1"), pch = 19)

Run the code above in your browser using DataCamp Workspace