procoteW {lazy.procrustes} | R Documentation |
Expanded Orthogonal Procrustes Rotation
procoteW( A, C, estm = 0, estW = 0, minW = 0.001, T = NULL, W = NULL, m = NULL, maxiter = 200, eps = 1e-06, print = 2 )
A |
The input matrix to be rotated |
C |
The target matrix |
estm |
= 1 to estimate m |
estW |
= 1 to estimate scalar W |
minW |
minimum value of the elements of W |
T |
Initial value of T or NULL |
W |
Initial value of W or NULL |
m |
Initial value of m or NULL |
maxiter |
max # of iterations |
eps |
convergence criterion for rmse |
print |
= 1 to print result |
This program finds those A, m, W and orthonormal T which minimize
RSS = tr( ( C - Chat )' ( C - Chat ) )
where Chat = A %*% W %*% T + matrix(1,nv) %*% t(m),
W is a diagonal Matrix, T is an orthonormal rotation matrix,
m is the column mean vector.
Note that when estW=0 and estm=0, and the target matrix does not
have missing elements,
this is equivalent to the usual orthogonal Procrustes rotation.
A list of:
B=A %*% W %*% T + matrix(1,nv,1)%*%t(m), T, W,
, C the updated target matrix, rmse=sqrt(RSS)
seed <- 1701; n <- 20; nr <- 2; pmiss <- 0; errstd <- 0.05 set.seed(seed) resg <- gendataWmm( 1, n, nr, genm=1, genW=2, pmiss=pmiss, errstd=errstd) A <- resg$A C <- resg$C; Tg <- resg$T; mg <- resg$m; Wg <- resg$W res <- procoteW( A, C, estm=1, estW=2, print=1 ) T <- res$T; m <- res$m; W <- res$W Print( Tg-T, mg-m, Wg-W, fmt="7.3")