smscl {lazy.mds}R Documentation

Simultaneous Diagonalization of Several Symmetric Matrices

Description

Simultaneous Diagonalization of Several Symmetric Matrices

Usage

smscl(C, lmax = 100, eps = 1e-08, print = 2)

Arguments

C

Input array of symmetric matrices

lmax

max # of iterations

eps

convergence criterion

print

= 1 to print result

Details

Given matrices C_k, n=1,2,...,nG, find the orthonormal matrix T such that

T' C_k T == W_k, k=1,2,...,nG, diag

OR

C_k == T W_k T', k=1,2,...,nG


This program minimizes

rss2 = sum_k ( (C_k - T W_k T')^2 )

with respect to orthogonal T and diagonal W_k.

Value

A list of
T, W, rmse, llll=iteretions needed, converged=1 if converged.

References

De Leeuw, Jan, and Pruzansky, Sandra (1978) A New Computational Method to Fit the Weighted Euclidean Distance Model. Psychometrika, v43 n4 p479-9

Examples

set.seed(1701)
W <- matrix( c( 1,1, 2,1, 1,2 ),,2, byrow=1 )
rownames(W) <- paste("sbj",1:nrow(W),sep="")
colnames(W) <- paste("d",1:ncol(W),sep="")
theta <- pi/3
T <- matrix(c(cos(theta),sin(theta),-sin(theta),cos(theta)),2,2)
C <- array(0,dim=c(2,2,3))
for( k in 1:nrow(W) ){
 C[,,k] <- T%*%diag(W[k,])%*%t(T)
 E <- 0.05*matrix(rnorm(4),2,2);    E <- (E+t(E))/2
 C[,,k] <- C[,,k] + E
}
dimnames(C) <- list(colnames(W),colnames(W),rownames(W))

res <- smscl( C, lmax=100, eps=1e-8, print=2 )

[Package lazy.mds version 0.1.2 Index]