S3 plot method for smacofP objects
# S3 method for smacofP
plot(
x,
plot.type = "confplot",
plot.dim = c(1, 2),
bubscale = 5,
col,
label.conf = list(label = TRUE, pos = 3, col = 1, cex = 0.8),
identify = FALSE,
type = "p",
pch = 20,
asp = 1,
main,
xlab,
ylab,
xlim,
ylim,
legend = TRUE,
legpos,
loess = TRUE,
...
)
an object of class smacofP
String indicating which type of plot to be produced: "confplot", "resplot", "Shepard", "stressplot","transplot", "bubbleplot" (see details)
dimensions to be plotted in confplot; defaults to c(1, 2)
Scaling factor (size) for the bubble plot
vector of colors for the points
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)
If 'TRUE', the 'identify()' function is called internally that allows to add configuration labels by mouse click
What type of plot should be drawn (see also 'plot')
Plot symbol
Aspect ratio; defaults to 1 so distances between x and y are represented accurately; can lead to slighlty weird looking plots if the variance on one axis is much smaller than on the other axis; use NA if the standard type of R plot is wanted where the ylim and xlim arguments define the aspect ratio - but then the distances seen are no longer accurate
plot title
label of x axis
label of y axis
scale of x axis
scale of y axis
Flag whether legends should be drawn for plots that have legends
Position of legend in plots with legends
should loess fit be added to Shepard plot
Further plot arguments passed: see 'plot.smacof' and 'plot' for detailed information.
Details:
Configuration plot (plot.type = "confplot"): Plots the MDS configurations.
Residual plot (plot.type = "resplot"): Plots the dissimilarities against the fitted distances.
Linearized Shepard diagram (plot.type = "Shepard"): Diagram with the transformed observed dissimilarities against the transformed fitted distance as well as loess curve and a least squares line.
Transformation Plot (plot.type = "transplot"): Diagram with the observed dissimilarities (lighter) and the transformed observed dissimilarities (darker) against the fitted distances together with the nonlinear regression curve
Stress decomposition plot (plot.type = "stressplot"): Plots the stress contribution in of each observation. Note that it rescales the stress-per-point (SPP) from the corresponding smacof function to percentages (sum is 100). The higher the contribution, the worse the fit.
Bubble plot (plot.type = "bubbleplot"): Combines the configuration plot with the point stress contribution. The larger the bubbles, the better the fit.
dis<-as.matrix(smacof::kinshipdelta)
res<-powerStressMin(dis)
plot(res)
plot(res,"reachplot")
plot(res,"Shepard")
plot(res,"resplot")
plot(res,"transplot")
plot(res,"stressplot")
plot(res,"bubbleplot")
Run the code above in your browser using DataLab