MSINI

   more...
Computes initial estimates in multidimensional scaling models.
Required Arguments
NSTIM — Number of stimuli in each dissimilarity matrix. (Input)
IFORM — Storage option for the data in each dissimilarity matrix. (Input)
Each column of X contains one of the NSUB dissimilarity matrices in the storage mode specified by IFORM.
IFORM
Data Storage Mode
0
Symmetric storage mode without the diagonal elements. (Upper triangular matrix stored columnwise.) Consecutive elements of each column of X contain the (1, 2), (1, 3), (2, 3), (1, 4), (2, 4), (3, 4), , (NSTIM  1, NSTIM) elements of the dissimilarity matrix.
1
Square matrix in full storage mode. Consecutive elements of each column of X contain the (1, 1), (2, 1), (3, 1), , (NSTIM, 1), (1, 2), (2, 2), , (NSTIMNSTIM) elements of the dissimilarity matrix.
XNV by NSUB matrix containing the NSUB dissimilarity matrices, where NV = NSTIM * (NSTIM  1)/2 if IFORM = 0, and NV = NSTIM * NSTIM if IFORM = 1. (Input)
If IFORM = 0, then the input data is assumed to be symmetric, and the elements below and on the diagonal are not input. If IFORM = 1, all elements of each column of X are input, and the data for the column need not form a symmetric matrix. Missing values (NaN, “not a number”) are not allowed in X, but the position of a missing element may be indicated as a negative dissimilarity. Since MSINI uses the absolute value of each element in X as the dissimilarity to be used in the estimation procedure, the sign of an element in X has no effect. See Comment 3.
IMOD — Vector of length 3 giving the model parameters to be estimated. (Input)
IMOD also gives the method of initialization to be used for each set of parameters. Each element of IMOD corresponds to a different parameter matrix. The correspondence is given as:
Element
Parameter Matrix
1
CFL–The configuration
2
W–The subject weights
3
WS–The stimulus weights
The value used for each element of IMOD tells how the parameter matrix is to be initialized.
Value
Effect on Parameter Matrix
0
The parameter matrix is not used.
1
The parameter matrix is input and its values are fixed. The parameter matrix may be standardized.
2
Initial estimates are input, but they may be changed by MSINI.
3
MSINI calculates the initial estimates.
IMOD(1) must be nonzero. IFORM must not be 0 if IMOD(3) is not zero. If IMOD(2) or IMOD(3) is 1, IMOD(1) must be 1. If IMOD(3) is 1, IMOD(2) must not be 2 or 3.
CFLNSTIM by NDIM matrix containing the estimated stimulus coordinates. (Input/Output, if IMOD(1) = 1 or 2; Output, otherwise)
WNSUB by NDIM matrix of subject weights. (Input/Output, if IMOD(2) = 1 or 2, output, if IMOD(2) = 3, not referenced if IMOD(2) = 0)
W is not referenced and can be dimensioned as a 1 by 1 matrix if IMOD(2) = 0.
WSNSTIM by NDIM matrix of stimulus weights. (Input/Output, if IMOD(3) = 1 or 2; Output, if IMOD(3) = 3; not referenced if IMOD(3) = 0)
WS is not referenced and can be dimensioned as a 1 by 1 matrix if IMOD(3) = 0.
WMIN — Minimum weight in W prior to adjustment. (Output, if IMOD(2) = 2 or 3; not referenced if IMOD(2) = 0 or 1)
If WMIN is negative, the weights in W are adjusted such that all weights are positive by subtracting WMIN from each element in W.
WSMIN — Minimum weight in WS prior to adjustment. (Output, if IMOD(3) = 2 or 3; not referenced if IMOD(3) = 0 or 1)
If WSMIN is negative, the weights in WS are adjusted such that all weights are positive by subtracting WSMIN from each element in WS.
Optional Arguments
NSUB — Number of dissimilarity matrices to be used in the analysis. (Input)
Default: NSUB = size (X,2).
LDX — Leading dimension of X exactly as specified in the dimension statement in the calling program. (Input)
Default: LDX = size (X,1).
NDIM — Number of dimensions in the solution. (Input)
Default: NDIM = size (CFL,2).
LDCFL — Leading dimension of CFL exactly as specified in the dimension statement in the calling program. (Input)
Default: LDCFL = size (CFL,1).
LDW — Leading dimension of W exactly as specified in the dimension statement in the calling program. (Input)
Default: LDW = size (W,1).
LDWS — Leading dimension of WS exactly as specified in the dimension statement in the calling program. (Input)
Default: LDWS = size (WS,1).
FORTRAN 90 Interface
Generic: CALL MSINI (NSTIM, IFORM, X, IMOD, CFL, W, WS, WMIN, WSMIN [])
Specific: The specific interface names are S_MSINI and D_MSINI.
FORTRAN 77 Interface
Single: CALL MSINI (NSTIM, NSUB, IFORM, X, LDX, IMOD, NDIM, CFL, LDCFL, W, LDW, WS, LDWS, WMIN, WSMIN)
Double: The double precision name is DMSINI.
Description
Routine MSINI computes initial estimates for the stimulus configuration (Λ = CFL), subject weights (W = W), and stimulus weights (Π = WS) in multidimensional scaling models. The number of dimensions in the solution must also be input. Routine MSINI requires complete (i.e., no missing values) dissimilarity matrices as input. Consequently, missing data must be replaced by an estimate (often an average of other dissimilarities). Because the absolute values of dissimilarities are used, missing dissimilarities may be denoted by changing their sign to be negative. Estimation of missing values, and further standardization, can be performed through the use of routine MSSTN.
In some cases, MSINI can use values input in parameter matrices CFL, W, or WS in order to compute initial estimates for other parameter matrices. For example, values input in matrix CFL may be used in the estimation of initial estimates for W or WS. Because of the method of estimation, values input for some parameter matrices will not effect the estimate computed for other matrices. In particular, values input in W will not effect the estimation of CFL, and values input in WS will not effect the estimation of either CFL or W. Note that some combinations of input and estimated matrices are not even allowed (see the option parameter IMOD). Also, note that when the configuration matrix CFL is input and fixed (except for standardization), computed estimates for all weights W and WS are arbitrarily taken as 1.
Let
denote the squared distance between stimulus i and stimulus j for matrix (subject) l, let
denote the average of the squared distances in the i‑th row for the l‑th subject, let
be similarly defined, and let
denote the average of all squared distances for the l‑th subject. If each dissimilarity input in X is measured without error, then the dissimilarities and the distances are identical. In MSINI, the errors observed in the dissimilarities,
are assumed to be small so that good estimates for the squared distances may be computed by squaring each dissimilarity (after first subtracting the constant obtained in Step 1 below). The computations proceed as follows:
1. The squared distance matrices are double‑centered using the product moment transformation
The matrix formed by averaging the product moment matrices Pl (over subjects) is computed as .
2. If the configuration has been input and cannot be modified (i.e., if IMOD(1) is 1), then all weights to be estimated are taken as 1, and the computations continue in Step 8 below.
3. If the configuration matrix has not been input, then a preliminary estimate is obtained by first computing the eigenvectors (Γ) corresponding to the d-largest eigenvalues of .
The configuration is then estimated as ΓΔ12 where Δ is the square matrix containing the eigenvalues along the diagonal and zeros off the diagonal.
4. If the subject weights W are to be estimated, or if they can be modified (i.e., if IMOD(2) is 2 or greater), then a SUMSCALE procedure (De Leeuw and Pruzansky, 1978) is used to estimate the weights (regardless of the values input) and to “rotate” the configuration estimates. This is done as follows:
A. The matrices
are computed, where Φ = Δ if Δ has been computed, and where the diagonal elements of Φ are the diagonal elements of ΛTΛ otherwise (the off‑diagonal elements of Φ are always zero).
B. An orthogonal matrix Q is found such that the sum of the squared off‑diagonal elements of QTClQ is minimized over all matrices C. (See IMSL routine KPRIN, in Chapter 9.
C. A new configuration estimate is obtained by “rotating” the current estimate, i.e., Λn = Λ.
D. The subject weights for subject l are taken as the diagonal elements of QTCl Q.
5. If the subject weights have been computed and the minimum weight in W is negative, add its absolute value to all elements in W to ensure that all estimated stimulus weights are nonnegative.
6. If the stimulus weights are to be estimated (i.e., if (IMOD(3) is 2 or 3), then least‑squares estimates are used. The least‑squares model is obtained by substituting predicted distance for actual distance in the multidimensional scaling model specified by IMOD (see the chapter introduction for a discussion of the models available). Least‑squares fitting is then performed over the NSUB subjects.
7. If the stimulus weights have been computed and the minimum weight in WS is negative, its absolute value is added to all elements in WS to ensure that all estimated stimulus weights are nonnegative.
8. The estimates are standardized (even when IMOD(i) = 2) as follows:
A. If IMOD(2) is not zero, then let
where λi is the i-th column of the configuration matrix. Let wi denote the i‑th column of the subject weight matrix. Standardize Λ such that the diagonal elements of ΛTΛ are 1. Multiply wi by ri.
B. If IMOD(2) = 0 but IMOD(3) is not zero, then compute ri and standardize the configuration matrix as above. Multiply the i‑th column of WS by ri.
C. If both IMOD(2) and IMOD(3) are nonzero, then compute
and standardize W such that WTW is an identity matrix. Multiply the i‑th column of WS by ci.
Comments
1. Workspace may be explicitly provided, if desired, by use of M2INI/DM2INI. The reference is:
CALL M2INI (NSTIM, NSUB, IFORM, X, LDX, IMOD, NDIM, CFL, LDCFL, W, LDW, WS, LDWS, WMIN, WSMIN, TR, XX, DISP, DS, EWK1, EWK2, IEWK, C)
The additional arguments are as follows:
TR — Real work vector of length max(NDIM + 1, NSUBNSTIM).
XX — Real work vector of length NSTIM * NSTIM.
DISP — Real work vector of length NSTIM * NSTIM * NSUB.
DS — Real work vector of length NSTIM * NSTIM.
EWK1 — Real work vector of length 3 * NSTIM.
EWK2 — Real work vector of length max(5 * NSTIM, 4 * NSUB).
IEWK — Integer work vector of length NSTIM.
C — Real work vector of length NDIM * NDIM * NSUB.
2. Informational error
Type
Code
Description
4
1
The sum of the product moment matrices for the data input in X has less than NDIM positive eigenvalues. Rerun with NDIM = number of positive eigenvalues or less or provide initial estimates for the configuration matrix CFL.
3. Routine MSSTN may be used to obtain the matrix X with missing values estimated and changed in sign so that all estimates of missing values are negative. Routine MSSTN will also convert similarities to dissimilarities. Unless a ratio distance measure is observed, the user will usually call MSSTN prior to calling MSINI.
Example
The following example illustrates the use of MSINI to obtain initial estimates for an individual differences model when symmetric dissimilarities matrices obtained from two subjects are input. The input matrices are given as:
Estimates obtained from MSINI are not optimal. Usually an optimizing multidimensional scaling routine will be called with the initial estimates computed in MSINI.
 
USE UMACH_INT
USE MSINI_INT
USE WRRRN_INT
 
IMPLICIT NONE
INTEGER IFORM, LDCFL, LDW, LDWS, LDX, NDIM, NSTIM, NSUB
PARAMETER (IFORM=0, LDCFL=5, LDW=2, LDWS=5, LDX=10, NDIM=2, &
NSTIM=5, NSUB=2)
!
INTEGER IMOD(3), NOUT
REAL CFL(LDCFL,NDIM), W(LDW,NDIM), WMIN, WS(LDWS,NDIM), &
WSMIN, X(LDX,NSUB)
!
DATA X/4.0, 1.0, 1.0, 3.0, 1.0, 2.0, 1.0, 3.0, 2.0, 4.0, 1.0, &
2.0, 1.0, 3.0, 2.0, 1.0, 1.0, 2.0, 3.0, 4.0/
DATA IMOD/3, 3, 0/
!
CALL UMACH (2, NOUT)
!
CALL MSINI (NSTIM, IFORM, X, IMOD, CFL, W, WS, WMIN, WSMIN)
!
CALL WRRRN ('The Configuration', CFL)
CALL WRRRN ('Subject weights', W)
WRITE (NOUT,99999) WMIN
!
99999 FORMAT (/, ' WMIN = ', F12.4)
!
END
Output
 
The Configuration
1 2
1 0.2279 0.6854
2 -0.0808 -0.6584
3 -0.1728 -0.0090
4 -0.6621 -0.2287
5 0.6879 0.2107
Subject weights
1 2
1 7.078 8.533
2 9.615 0.000
WMIN = 0.0000
Published date: 03/19/2020
Last modified date: 03/19/2020