How to Calculate Canonical Correlation

Canonical correlation refers to a statistical process and numbers associated with data. The process of canonical correlation takes two sets of data that may or may not be related and analyzes them in terms of their relationship to each other. The result of this method is a set of numbers called canonical correlations that explain the variance of one set of data using the variance of the other sets of data. Researchers using canonical correlation only run this method for two sets of data at a time.

Instructions

    • 1

      Arrange the data into matrices. For two sets of data with variables "x" and "y," place the data into matrices and call them "X" and "Y," respectively.

    • 2

      Compute the transposes of X and Y. Reverse the rows of X with the columns of X. Do the same for Y. Call these new matrices "X'" and "Y'," respectively.

    • 3

      Calculate the correlation matrices "Rxx," "Rxy," "Ryy" and "Ryx." For a given correlation matrix "Rab," the calculation procedure is to multiple the transpose of the first variable's data matrix by the data matrix for the second variable and divide the resulting matrices' cell entries by one less the number of data points. Mathematically, Rab = A'B/(n-1), where "n" is the number of cells in the data matrix A or B (they will be the same).

    • 4

      Compute the inverse of the data matrices, Rxx and Ryy. The inverse of a matrix "X" is the matrix "Z" that allows the following two equations to hold true: XZ = I and ZX = I, where "I" is the identity matrix that has 1s through its diagonal and zeros elsewhere. Call the inverses for Rxx and Ryy "iRxx" and "iRyy," respectively.

    • 5

      Create the matrices iRxx*Rxy*iRyy*Ryx and iRyy*Ryx*iRxx*iRxy. Use standard matrix multiplication to create two matrices from these eight matrices.

    • 6

      Find the eigenvalues of the matrices. Finding the eigenvalue of a matrix is different for each matrix because of the variance in matrix size. There are myriad programs that can find the eigenvalue of a given matrix for you.

    • 7

      Compute the canonical correlations. Take the square roots of the eigenvalues found. These resulting numbers are the canonical correlations.

Learnify Hub © www.0685.com All Rights Reserved