Statscraft 0.61.0, release v0.61.0
ALSCAL
Multidimensional scaling of proximity matrices, symmetric, asymmetric or rectangular, by alternating least squares on squared distances.
Syntax
ALSCAL VARIABLES=varlist | /MATRIX=IN('file' | dataset | *)
[/INPUT=ROWS(ALL | n)] [/SHAPE=SYMMETRIC | ASYMMETRIC | RECTANGULAR]
[/LEVEL=ORDINAL[([UNTIE] [SIMILAR])] | INTERVAL[(1..4)] | RATIO[(1..4)] | NOMINAL]
[/CONDITION=MATRIX | ROW | UNCONDITIONAL] [/MODEL=EUCLID | INDSCAL | ASCAL | AINDS | GEMSCAL]
[/CRITERIA=[NEGATIVE] [CUTOFF(0)] [CONVERGE(.001)] [ITER(30)] [STRESSMIN(.005)] [DIMENS(2[,max])] [DIRECTIONS(q)]]
[/PRINT=[DATA] [HEADER]] [/PLOT[=DEFAULT | ALL]] [/OUTFILE='file' | dataset]
[/FILE='file' | dataset [CONFIG | ROWCONF | COLCONF] [SUBJWGHT] [STIMWGHT] [(INITIAL)]].
Each case is a row of a square matrix of dissimilarities and each variable a column; only the triangle below the diagonal is read (SHAPE=ASYMMETRIC reads both), and more cases than variables hold one matrix per subject. With SHAPE=ASYMMETRIC the distances stay symmetric and each ordered pair of stimuli is a datum of its own: the disparities, S-stress, stress and RSQ run over all of them, a pair given in one triangle only counts once, and the start averages the two triangles.
SHAPE=RECTANGULAR (unfolding) makes the rows and the columns two sets of stimuli in one space: each case is a row of the data, the variables are its columns, INPUT=ROWS(n) takes n cases for each matrix (all cases for one matrix without it), and each value is the proximity of a row stimulus and a column stimulus, fitted to the distance between them; at least 4 rows and 4 columns. Rows and columns get coordinates of their own (Row and Column Stimulus Coordinates, the rows named Row 1, Row 2, …). The start completes each matrix with the distances of two rows and of two columns, taken midway between the bounds the triangle inequality gives from their distances to the other set, and scales that. MATRIX=IN is not read with this shape.
MATRIX=IN reads a matrix file of PROXIMITIES or CLUSTER instead, VARIABLES picking its items; a similarity file is scaled as SIMILAR, or turned into dissimilarities from its largest value for INTERVAL and RATIO. A missing value or one below CUTOFF is left out; the weight variable is not used. The model fits squared distances to squared disparities and reports S-stress, the root of the mean over the matrices of their squared misfit relative to the fourth powers of the disparities. ORDINAL keeps the order of the data (UNTIE lets ties part, SIMILAR turns the order), NOMINAL only which values are equal; INTERVAL(n) and RATIO(n) make the squared disparities a polynomial of degree n of the squared data, with and without an intercept. CONDITION=MATRIX fits each matrix on its own, UNCONDITIONAL all at once, ROW (asymmetric or rectangular data) each row of each matrix on its own, the first stimulus of an ordered pair, or the row of the data, naming its row. MODEL=INDSCAL weights the dimensions per matrix (no negative weights unless NEGATIVE). MODEL=ASCAL (SHAPE=ASYMMETRIC, 2 or more dimensions) gives every stimulus weights of the dimensions that count when it is the first of a pair, d(i,j)^2 = sum of v(i,a) (x(i,a) - x(j,a))^2, which makes the distance from i to j differ from the way back; the weights of a dimension average 1 over the stimuli, which fixes the scale of its coordinates, and the axes are not turned. MODEL=AINDS adds the subject weights of INDSCAL (more than one matrix; one matrix is fitted as ASCAL): d(i,j,k)^2 = sum of w(k,a) v(i,a) (x(i,a) - x(j,a))^2. Neither goes with CONDITION=ROW.
MODEL=GEMSCAL (more than one matrix, 2 or more dimensions) gives every matrix a metric of its own on the group space, d(i,j,k)^2 = (x(i) - x(j))’ M(k) (x(i) - x(j)), where M(k) has q directions, unit vectors of the space with a weight each: DIRECTIONS(q) of CRITERIA, at most the dimensions and by default as many. Each iteration fits the metric of a matrix by least squares and keeps its q largest eigenvalues (positive ones unless NEGATIVE); the coordinates are then turned to principal axes with a sum of squares of the number of stimuli per dimension. The Subject Weights table holds the weights of the directions and Subject Directions the directions as columns; INDSCAL is the case of the axes as directions. The start is classical scaling of the mean scalar products of all matrices, after each got the smallest constant that makes it a metric. Iterations stop when S-stress improves by less than CONVERGE, falls to STRESSMIN or after ITER; DIMENS(min,max) solves from max down to min (1 only for EUCLID), each smaller solution from the first dimensions of the one before.
Tables per dimensionality: Iteration History (S-stress and its improvement), Stress and Squared Correlation (RSQ) in Distances per matrix (Kruskal’s stress formula 1 and the squared correlation of disparities and distances, with their average), Stimulus Coordinates, for INDSCAL and AINDS Subject Weights and for ASCAL and AINDS Stimulus Weights; PRINT=DATA adds the data and the optimally scaled data, HEADER the options. The coordinates are centered; EUCLID turns them to principal axes with a mean square of 1, INDSCAL scales each dimension to a sum of squares equal to the number of stimuli (the weights the other way) and orders the dimensions by their weights; every dimension is signed so that the first stimulus is positive. PLOT gives the configuration, the subject weights, the stimulus weights, the linear fit (disparities against distances), the nonlinear fit (data against distances) for ORDINAL and NOMINAL and the transformation (data against disparities), with ALL one per matrix. OUTFILE writes TYPE_ (CON for coordinates, SUB for subject weights, STI for stimulus weights, GEM for the directions of a matrix, one row for each dimension; ROW and COL for the two sets of a rectangular matrix), DIMENS, MATNUM (0 for coordinates) and DIM1, DIM2, … for every dimensionality. FILE reads such a file (or any with TYPE_, DIM1, DIM2, …) to start the iterations from: the first rows of TYPE_ CON or ROW with a value in the last dimension, one for each stimulus, are the starting coordinates of the largest dimensionality (for a rectangular matrix the rows come as ROW or CON and the columns as COL; COLCONF is accepted with it), and with MODEL=INDSCAL or GEMSCAL (as the diagonal of the metrics) the TYPE_ SUB rows, one for each matrix, the starting weights (they are read when SUBJWGHT is listed, or when nothing is listed); with MODEL=ASCAL or AINDS the TYPE_ STI rows, one for each stimulus, start the stimulus weights (STIMWGHT, or when nothing is listed and the file has them). Each part read takes INITIAL (the default: it only starts the iterations) or FIXED in parentheses: CONFIG(FIXED) or ROWCONF(FIXED) keeps the coordinates (of the rows of a rectangular matrix), COLCONF(FIXED) those of its columns, SUBJWGHT(FIXED) the subject weights (INDSCAL and AINDS) and STIMWGHT(FIXED) the stimulus weights, and the rest is solved for them. With anything fixed the coordinates and weights are shown as the file gives them, with no centering, turning, scaling or ordering. The words may be cut to three letters.
Example
ALSCAL VARIABLES=s1 TO s9 /LEVEL=ORDINAL /CRITERIA=DIMENS(2,3) /PLOT.
statscraft help ALSCAL prints the same text in the terminal. All commands