Stata 11 help for mds_postestimation

help mds postestimation dialogs: predict estat mdsconfig mdsshepard also see: mds, mdslong, mdsmat -------------------------------------------------------------------------------

Title

[MV] mds postestimation -- Postestimation tools for mds, mdsmat, and mdslong

Description

The following postestimation commands are of special interest after mds, mdsmat, and mdslong:

command description ------------------------------------------------------------------------- estat config coordinates of the approximating configuration estat correlations correlations between disparities and distances estat pairwise pairwise disparities, distances, and residuals estat quantiles quantiles of the residuals per object estat stress Kruskal stress (loss) measure (only after classical MDS) + estat summarize estimation sample summary mdsconfig plot of approximating configuration mdsshepard Shepard diagram screeplot plot eigenvalues (only after classical MDS) ------------------------------------------------------------------------- + estat summarize is not available after mdsmat.

The following standard postestimation commands are also available:

command description ------------------------------------------------------------------------- * estimates cataloging estimation results predict approximating configuration, disparities, dissimilarities, distances, and residuals ------------------------------------------------------------------------- * All estimates subcommands except table and stats are available.

Special-interest postestimation commands

estat config lists the coordinates of the approximating configuration.

estat correlations lists the Pearson and Spearman correlations between the disparities or dissimilarities and the Euclidean distances for each object.

estat pairwise lists the pairwise statistics: the disparities, the distances, and the residuals.

estat quantiles lists the quantiles of the residuals per object.

estat stress displays the Kruskal stress (loss) measure between the (transformed) dissimilarities and fitted distances per object (only after classical MDS).

estat summarize summarizes the variables in the MDS over the estimation sample. After mds, estat summarize also reports whether and how variables were transformed before computing similarities or dissimilarities.

mdsconfig produces a plot of the approximating Euclidean configuration. By default, dimensions 1 and 2 are plotted.

mdsshepard produces a Shepard diagram of the disparities against the Euclidean distances. Ideally, the points in the plot should be close to the y=x line. Optionally, separate plots are generated for each "row" (value of id()).

Syntax for predict

predict [type] {stub*|newvarlist} [if] [in] [, statistic options]

statistic description ------------------------------------------------------------------------- Main config approximating configuration; specify dimension() or fewer variables pairwise(pstats) selected pairwise statistics; specify same number of variables -------------------------------------------------------------------------

pstats description ------------------------------------------------------------------------- disparities disparities = transformed(dissimilarities) dissimilarities dissimilarities distances Euclidean distances between configuration points rresiduals raw residual = dissimilarity - distance tresiduals transformed residual = disparity - distance weights weights -------------------------------------------------------------------------

options description ------------------------------------------------------------------------- Main * saving(filename[, replace]) save results to filename; use replace to overwrite existing filename full create predictions for all pairs of object; pairwise() only ------------------------------------------------------------------------- * saving() is required after mdsmat, after mds if pairwise is selected, and after mdslong if config is selected.

Menu

Statistics > Postestimation > Predictions, residuals, etc.

Options for predict

+------+ ----+ Main +-------------------------------------------------------------

config generates variables containing the approximating configuration in Euclidean space. Specify as many new variables as approximating dimensions (as determined by the dimension() option of mds, mdsmat, or mdslong), though you may specify fewer. estat config displays the same information but does not store the information in variables. After mdsmat and mdslong, you must also specify the saving() option.

pairwise(pstats) generates new variables containing pairwise statistics. The number of new variables should be the same as the number of specified statistics. The following statistics are allowed

disparities generates the disparities, i.e., the transformed dissimilarities. If no transformation is applied (modern MDS with transform(identity)), disparities are the same as dissimilarities.

dissimilarities generates the dissimilarities used in MDS. If mds, mdslong, or mdsmat was invoked on similarity data, the associated dissimilarities are returned.

distances generates the (unsquared) Euclidean distances between the fitted configuration points.

rresiduals generates the raw residuals: dissimilarities - distances.

tresiduals generates the transformed residuals: disparities - distances.

weights generates the weights. Missing proximities are represented by zero weights.

estat pairwise displays some of the same information but does not store the information in variables.

After mds and mdsmat, you must also specify the saving() option. With n objects, the pairwise dataset has n(n-1)/2 observations. In addition to the three requested variables, predict produces variables id1 and id2, which identify pairs of objects. With mds, id is the name of the identification variable (id() option) and with mdsmat it is "Category".

saving(filename[, replace]) is required after mdsmat, after mds if pairwise() is selected, and after mdslong if config is selected. saving() indicates that the generated variables are to be created in a new Stata dataset and saved in the file named filename. Unless saving() is specified, the variables are generated in the current dataset.

replace indicates that filename specified in saving() may be overwritten.

full creates predictions for all pairs of objects (j1,j2). The default is to generate predictions only for pairs (j1,j2) where j1>j2. full may be specified only with pairwise().

Syntax for estat

List the coordinates of the approximating configuration

estat config [, maxlength(#) format(%fmt)]

List the Pearson and Spearman correlations

estat correlations [, maxlength(#) format(%fmt) notransform nototal]

List the pairwise statistics: disparities, distances, and residuals

estat pairwise [, maxlength(#) notransform full separator]

List the quantiles of the residuals

estat quantiles [, maxlength(#) format(%fmt) nototal notransform]

Display the Kruskal stress (loss) measure per point (only after classical MDS)

estat stress [, maxlength(#) format(%fmt) nototal notransform]

Summarize the variables in MDS

estat summarize [, labels]

options description ------------------------------------------------------------------------- maxlength(#) maximum number of characters for displaying object names; default is 12 format(%fmt) display format nototal suppress display of overall summary statistics notransform suppress the linear transformation of the dissimilarities full display all pairs (j1,j2); default is (j1>j2) only separator draw separating lines labels display variable labels -------------------------------------------------------------------------

Menu

Statistics > Postestimation > Reports and statistics

Options for estat

maxlength(#), an option used with all but estat summarize, specifies the maximum number of characters of the object names to be displayed; the default is maxlength(12).

format(%fmt), an option used with estat config, estat correlations, estat quantiles, and estat stress, specifies the display format; the default differs between the subcommands.

nototal, an option used with estat correlations, estat quantiles, and estat stress, suppresses the overall summary statistics.

notransform, an option used with estat correlations, estat pairwise, estat quantiles, and estat stress, specifies that the untransformed dissimilarities be used instead of the transformed dissimilarities (disparities).

full, an option used with estat pairwise, displays a row for all pairs (j1,j2). The default is to display rows only for pairs where j1>j2.

separator, an option used with estat pairwise, draws separating lines between blocks of rows corresponding to changes in the first of the pair of objects.

labels, an option used with estat summarize, displays variable labels.

Syntax for mdsconfig

mdsconfig [, options]

options description ------------------------------------------------------------------------- Main dimensions(# #) two dimensions to be displayed; default is dimensions(2 1) xnegate negate data relative to the x axis ynegate negate data relative to the y axis autoaspect adjust aspect ratio on the basis of the data; default aspect ratio is 1 maxlength(#) maximum number of characters used in marker labels cline_options affect rendition of the lines connecting points marker_options change look of markers (color, size, etc.) marker_label_options change look or position of marker labels

Y axis, X axis, Titles, Legend, Overall twoway_options any options other than by() documented in [G] twoway_options -------------------------------------------------------------------------

Menu

Statistics > Multivariate analysis > Multidimensional scaling (MDS) > Postestimation > Approximating configuration plot

Options for mdsconfig

+------+ ----+ Main +-------------------------------------------------------------

dimensions(# #) identifies the dimensions to be displayed. For instance, dimensions(3 2) plots the third dimension (vertically) versus the second dimension (horizontally). The dimension number cannot exceed the number of extracted dimensions. The default is dimensions(2 1).

xnegate specifies that the data be negated relative to the x axis.

ynegate specifies that the data be negated relative to the y axis.

autoaspect specifies that the aspect ratio be automatically adjusted based on the range of the data to be plotted. This option can make some plots more readable. By default, mdsconfig uses an aspect ratio of one, producing a square plot. Some plots will have little variation in the y-axis direction, and use of the autoaspect option will better fill the available graph space while preserving the equivalence of distance in the x and y axes.

As an alternative to autoaspect, the twoway_option aspectratio() can be used to override the default aspect ratio. mdsconfig accepts the aspectratio() option as a suggestion only and will override it when necessary to produce plots with balanced axes; i.e., distance on the x axis equals distance on the y axis.

twoway_options, such as xlabel(), xscale(), ylabel(), and yscale(), should be used with caution. These options are accepted but may have unintended side effects on the aspect ratio.

maxlength(#) specifies the maximum number of characters for object names used to mark the points; the default is maxlength(12).

cline_options affect the rendition of the lines connecting the plotted points; see [G] cline_options. If you are drawing connected lines, the appearance of the plot depends on the sort order of the data.

marker_options affect the rendition of the markers drawn at the plotted points, including their shape, size, color, and outline; see [G] marker_options.

marker_label_options specify if and how the markers are to be labeled; see [G] marker_label_options.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G] twoway_options, excluding by(). These include options for titling the graph (see [G] title_options) and for saving the graph to disk (see [G] saving_option). See autoaspect above for a warning against using options such as xlabel(), xscale(), ylabel(), and yscale().

Syntax for mdsshepard

mdsshepard [, options]

options description ------------------------------------------------------------------------- Main notransform use dissimilarities instead of disparities autoaspect adjust aspect ratio on the basis of the data; default aspect ratio is 1 separate draw separate Shepard diagrams for each object marker_options change look of markers (color, size, etc.)

Y axis, X axis, Titles, Legend, Overall twoway_options any options other than by() documented in [G] twoway_options byopts(by_option) affect the rendition of combined graphs; separate only -------------------------------------------------------------------------

Menu

Statistics > Multivariate analysis > Multidimensional scaling (MDS) > Postestimation > Shepard diagram

Options for mdsshepard

+------+ ----+ Main +-------------------------------------------------------------

notransform uses dissimilarities instead of disparities, i.e., suppresses the transformation of the dissimilarities.

autoaspect specifies that the aspect ratio is to be automatically adjusted based on the range of the data to be plotted. By default, mdsshepard uses an aspect ratio of one, producing a square plot.

See the description of the autoaspect option of mdsconfig for more details.

separate displays separate plots of each value of the id variable. This may be time consuming if the number of distinct id values is not small.

marker_options affect the rendition of the markers drawn at the plotted points, including their shape, size, color, and outline; see [G] marker_options.

+-----------------------------------------+ ----+ Y axis, X axis, Titles, Legend, Overall +--------------------------

twoway_options are any of the options documented in [G] twoway_options, excluding by(). These include options for titling the graph (see [G] title_options) and for saving the graph to disk (see [G] saving_option). See the autoaspect option of mdsconfig for a warning against using options such as xlabel(), xscale(), ylabel(), and yscale().

byopts(by_option) is documented in [G] by_option. This option affect the appearance of the combined graph and only allowed with the separate option.

Examples

. sysuse auto . mds price-gear, id(make) dim(2) std . estat config . estat correlations . estat quantiles . estat pairwise . estat stress . estat summarize

. mdsconfig . mdsshepard

. predict d1 d2, config . predict disp diss dist, pairwise(disp diss dist) saving(gd3)

Saved results

estat correlations saves the following in r():

Matrices r(R) statistics per object; columns with # of obs., Pearson corr., and Spearman corr. r(T) overall statistics; # of obs., Pearson corr., and Spearman corr.

estat quantiles saves the following in r():

Macros r(dtype) adjusted or raw; dissimilarity transformation

Matrices r(Q) statistics per object; columns with # of obs., min., p25, p50, p75, and max. r(T) overall statistics; # of obs., min., p25, p50, p75, and max.

estat stress saves the following in r():

Macros r(dtype) adjusted or raw; dissimilarity transformation

Matrices r(S) Kruskal's stress/loss measure per object r(T) 1 x 1 matrix with the overall Kruskal stress/loss measure

Also see

Manual: [MV] mds postestimation

Help: [MV] mds; [MV] mdslong, [MV] mdsmat [MV] screeplot


© Copyright 1996–2009 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index