Reputation: 45
I have tried canonical correlation to a practical dataset.
The following link was used as reference: http://www.mathworks.com/help/stats/canoncorr.html
My x
dataset has 100 * 4 and y
dataset has 100 * 1 variables.
I was able to plot the graphs as mentioned in the tutorial link but was curious on this equation from that tutorial:
xlabel('0.0025*Disp + 0.020*HP - 0.000025*Wgt')
How can I generate a similar equation/relation for my data? Also how can I generate the variance in dependent variables explained by canonical variables?
Thanks in advance!
Upvotes: 1
Views: 956
Reputation: 11
In the tutorial, it's taking the first 3 columns of X as the independent data and last two columns as the dependent data. The equation for xlabel is obtained by multiplying the first set of canonical loadings with the independent variables, i.e. the first column of A and the three independent variable names, Disp, HP and Wgt. This tells you how the first canonical variable is formed in the independent variable set. You can do the same to your own data. Variance in dependent variables explained by canonical variables: you can simply calculate the R squared value for this which is the squared correlation between canonical variables and the dependent variables and take the average. For example, correlate the first canonical variable with all the dependent variables and take the squared values and average them, then you get the variance in dependent variable set explained by the first canonical variable.
Upvotes: 1