I have calculated some pairwise correlation coefficients between observations in a panel data set within a grouping variable, and I have successfully transferred the correlation coefficient matrix into a data set. I am now looking to calculate some summary statistics for these correlation coefficients (mean, percentiles, std), however, I do not want to double count coefficients in these calculations. For example, since the correlation coefficient at column C1 row 2 is the same at column C2 row one, if I collapse and sum by column, I will be double counting these coefficients. Similarly, I do not want to include correlation coefficients between a variable and itself. How can I avoid double counting correlation coefficients?
[CODE]
* Example generated by -dataex-. For more info, type help dataex
clear
Code:
* Example generated by -dataex-. For more info, type help dataex
clear
input float(C1 C2 C3 C4 C5 C6 C7 C8)
1 .9937328 .9937328 . . . 1 .9032351
.9937328 1 1 . . . 1 .946541
.9937328 1 1 . . . 1 .946541
. . . 1 1 . . -1
. . . 1 1 . . -1
. . . . . . . .
1 1 1 . . . 1 .
.9032351 .946541 .946541 -1 -1 . . 1
end
0 Response to Calculating summary statistics for correlation coefficients
Post a Comment