Sunday, 5 February 2017

Correlations pearson, spearman or kendall.

 cor(r, use="complete.obs", method="pearson" )

 cor(x, use=, method= ) where
OptionDescription
xMatrix or data frame
useSpecifies the handling of missing data. Options are all.obs (assumes no missing data - missing data will produce an error), complete.obs (listwise deletion), and pairwise.complete.obs (pairwise deletion)
methodSpecifies the type of correlation. Options are pearsonspearman or kendall.






                 M          So          Ed         Po1         Po2         LF         M.F
M       1.00000000  0.58435534 -0.53023964 -0.50573690 -0.51317336 -0.1609488 -0.02867993
So      0.58435534  1.00000000 -0.70274132 -0.37263633 -0.37616753 -0.5054695 -0.31473291
Ed     -0.53023964 -0.70274132  1.00000000  0.48295213  0.49940958  0.5611780  0.43691492
Po1    -0.50573690 -0.37263633  0.48295213  1.00000000  0.99358648  0.1214932  0.03376027
Po2    -0.51317336 -0.37616753  0.49940958  0.99358648  1.00000000  0.1063496  0.02284250
LF     -0.16094882 -0.50546948  0.56117795  0.12149320  0.10634960  1.0000000  0.51355879
M.F    -0.02867993 -0.31473291  0.43691492  0.03376027  0.02284250  0.5135588  1.00000000
Pop    -0.28063762 -0.04991832 -0.01722740  0.52628358  0.51378940 -0.1236722 -0.41062750
NW      0.59319826  0.76710262 -0.66488190 -0.21370878 -0.21876821 -0.3412144 -0.32730454
U1     -0.22438060 -0.17241931  0.01810345 -0.04369761 -0.05171199 -0.2293997  0.35189190
U2     -0.24484339  0.07169289 -0.21568155  0.18509304  0.16922422 -0.4207625 -0.01869169
Wealth -0.67005506 -0.63694543  0.73599704  0.78722528  0.79426205  0.2946323  0.17960864
Ineq    0.63921138  0.73718106 -0.76865789 -0.63050025 -0.64815183 -0.2698865 -0.16708869
Prob    0.36111641  0.53086199 -0.38992286 -0.47324704 -0.47302729 -0.2500861 -0.05085826

No comments:

Post a Comment