procotWKS {lazy.procrustes}R Documentation

Weighted Orthogonal Procrustes Rotation by Koschat and Swayne's method

Description

Weighted Orthogonal Procrustes Rotation by Koschat and Swayne's method

Usage

procotWKS(A, C, D2, Tinit = diag(ncol(A)), Aainit = NULL, maxiter = 200,
  eps = 1e-06, epsd = 0.001, SQUAREM = 3, nSQUAREM = 1,
  minalpha = -999, maxalpha = -1, always = 0, reset1 = 0, reset2 = 1,
  print = 1)

Arguments

A

The matrix to be rotated

C

The target matrix

D2

The weight matrix

Tinit

initial value of T matrix

Aainit

= Aa matrix which stays constant in this function.

maxiter

max # of iterations

eps

convergence criterion for rmse

epsd

convergence criterion for maximum absolute differences.

SQUAREM

= 3 : See the help of iSQUAREM in lazy.accel package.

nSQUAREM

= 1 : See the help of iSQUAREM in lazy.accel package.

minalpha

= -999 : See the help of iSQUAREM in lazy.accel package.

maxalpha

= -1 : See the help of iSQUAREM in lazy.accel package.

always

= 1 : See the help of iSQUAREM in lazy.accel package.

reset1

= 0 : See the help of iSQUAREM in lazy.accel package.

reset2

= 1 : See the help of iSQUAREM in lazy.accel package.

print

= 1 to print the result

Details

This program minimizes
RSS = Tr( ( C - A T ) D2 ( C - A T )' )
w.r.t T subject to T'T = TT' = I,
using Koschat and Swayne (1991) algorithm.
The missing elements of C matrix will be estimated so that they also minimize RSS.

Value

A list of B=A T, T, Cm, A, C, D2, rmse, rmse0
where B is the rotated matrix, T is the rotation matrix,
Cm is the target matrix with its missing elements replaced by LSE,
rmse and rmse0 are, resp, weighted and unweighted RMSE.

References

Koschat, M.A., and Swayne, D.F., (1989). A weighted Procrustes criterion. Psychometrika, 56(2), pp. 229-239.

Examples

seed <- 1701; set.seed(seed)
nvar <- 20; ndim <- 4
errstd <- 0.1
resg <- gendataWmm( 1, nvar, ndim )
A <- resg$A; Cg <- resg$C; Tg <- resg$T
C <- resg$C + errstd*matrix(rnorm(nvar*ndim),nvar)
pmiss <- 0.5
locmiss <- unique( sample(1:(nvar*ndim), pmiss*(nvar*ndim), replace=1) )
C[locmiss] <- NA
V <- diag(ndim)
V <- matrix(rnorm(nvar*ndim),nvar); V <- t(V)%*%V/nvar
Print(A,C,V)
res <- procotWKS( A, C, V )


[Package lazy.procrustes version 0.1.3 Index]