Function to reparameterize two matrices
dot-reparameterize.Rdtest
Details
Designed to output matrices of the same dimension as x_mat
and y_mat, but linearly transformed so x_mat %*% t(y_mat)
is preserved but either x_mat %*% t(x_mat) is diagonal and equal to
y_mat %*% t(y_mat) (if equal_covariance is FALSE)
or x_mat %*% t(x_mat)/nrow(x_mat) is diagonal and equal to
y_mat %*% t(y_mat)/nrow(y_mat) (if equal_covariance is TRUE)