This is a slightly modified version of Flury's FG algorithm for the joint diagonalization of k positive-definite matrices. The underlying function is written in C.
FG(X, weight = NULL, init = NULL, maxiter = 100, eps = 1e-06, na.action = na.fail)
A list with the components
An orthogonal matrix.
A stacked matrix with the diagonal matrices or an array with the diagonal matrices. The form of the output depends on the form of the input.
The Fortran function returns also the number of iterations.
A matrix of k stacked pxp matrices with dimension c(kp,p) or an array with dimension c(p,p,k).
A vector of length k to give weight to the different matrices, if NULL, all matrices have equal weight.
Initial value for the orthogonal matrix to be estimated, if NULL, the identity matrix is used.
Maximum number of iterations.
Convergence tolerance.
A function which indicates what should happen when the data contain 'NA's. Default is to fail.
Jari Miettinen
Flury, B. D. (1998), Common principal components and related models, Wiley, New York.
rjd
, rjd.fortran