procote {lazy.procrustes}R Documentation

Extened Orthogonal Procrustes Rotation

Description

Extened Orthogonal Procrustes Rotation

Usage

procote(A, C, estm = 0, estd = 0, maxiter = 200, eps = 1e-06, print = 2)

Arguments

A

The input matrix to be rotated

C

The target matrix

estm

= 1 to estimate column means

estd

= 1 to estimate scaling constant

maxiter

max # of iterations

eps

convergence criterion for rmse

print

= 0 to surpress the output

Details

This program finds those A, m, d and orthonormal T which minimize
RSS = tr( ( C - Chat )' ( C - Chat ) )
where Chat = d * A %*% T + matrix(1,nv) %*% t(m), d is a scalar, T is an orthonormal rotation matrix,
m is the column mean vector.

Note that when estd=0 and estm=0, and the target matrix does not have missing elements,
this is equivalent to the usual orthogonal Procrustes rotation.

Value

A list of:
B=d * A %*% T + matrix(1,nv,1)%*%t(m),
T, m, d, Cm the updated target matrix, rmse=sqrt(RSS)

Examples

 seed <- 1701; n <- 20; r <- 4; pmiss <- 0; errstd <- 0.05
 set.seed(seed)
 resg <- gendataWmm( 1, n, r, 1, 1, pmiss=pmiss, errstd=errstd )
 A <- resg$A
 C <- resg$C; Tg <- resg$T; mg <- resg$m; dg <- resg$W[1]
 res <- procote( A, C, estm=1, estd=1, print=1 )
 T <- res$T; m <- res$m; d <- res$d
 Print(Tg-T,mg-m,dg-d, fmt="7.3")


[Package lazy.procrustes version 0.1.4 Index]