in reply to combining multiple matrices with placeholders if row and column values in one matrix do not exist in another

From a statistics point of view (ignoring your Perl question alltogether), I would put 1.0 on the diagonal of the missing lines and columns to ensure that the augmented matrix is a correlation matrix again. This would also help to maintain the status as a correlation matrix when doing weighted averages across matrices.

Generally, a lot of things can go wrong when manipulating large correlation matrices.

  • Comment on Re: combining multiple matrices with placeholders if row and column values in one matrix do not exist in another
  • Download Code