Skip to contents

Compute relative excess covariances (REC) matrix among variables in supplied data.

Usage

cov.rec(data, na.rm = TRUE)

Arguments

data

A data.frame or tibble

na.rm

logical (defaults to TRUE)

Value

A numeric matrix of correlations among variable residuals.

Details

[Experimental]

Examples

  # Use the SCWB data example
  data(SCWB)
  cov.rec(SCWB[, 1:20])
#>                cwbcloserel  cwbrespect    cwbtrust cwbmutuality cwbbeneficence
#> cwbcloserel             NA  0.54034574  0.54910276   0.36884996    -0.09467248
#> cwbrespect      0.54034574          NA  0.84022436   0.48852848    -0.20125351
#> cwbtrust        0.54910276  0.84022436          NA   0.68331668    -0.17641881
#> cwbmutuality    0.36884996  0.48852848  0.68331668           NA    -0.14309057
#> cwbbeneficence -0.09467248 -0.20125351 -0.17641881  -0.14309057             NA
#> cwbintegrity   -0.22035275 -0.15887033 -0.19531345  -0.08832192     0.62053155
#> cwbcompetence  -0.19871930 -0.18794601 -0.25631494  -0.29349500     0.43950427
#> cwbvision      -0.23163010 -0.23912246 -0.19921128  -0.14646969     0.38606172
#> cwbrelgrowth   -0.01470541 -0.30253143 -0.19301546  -0.16637322     0.13715879
#> cwbfairness    -0.21958341 -0.04616776 -0.02071282  -0.16504481     0.14556880
#> cwbsustenance  -0.18262646 -0.19734693 -0.12983705  -0.17585203     0.01618142
#> cwbachieve     -0.22294685 -0.24726411 -0.15302974  -0.12392604     0.05840806
#> cwbsatisf       0.22641779  0.23286397  0.42084895   0.26891278    -0.18796760
#> cwbvalue        0.09242081  0.04574523 -0.05270340   0.02261141    -0.19155570
#> cwbbelonging    0.10159476  0.15121917  0.07748288   0.02604193    -0.11017386
#> cwbwelcome      0.11337464  0.26543804  0.15900918  -0.01556857    -0.18354411
#> cwbpurpose     -0.12938183  0.02308694 -0.10022543  -0.08212507    -0.21409678
#> cwbcontrib     -0.19834016 -0.18484656 -0.28743182  -0.11647635    -0.05757698
#> cwbinterconn   -0.07941632 -0.23991519 -0.33969222  -0.08931540    -0.09401367
#> cwbsynergy     -0.21015704 -0.40511155 -0.45695837  -0.17050446    -0.08951049
#>                cwbintegrity cwbcompetence   cwbvision cwbrelgrowth  cwbfairness
#> cwbcloserel    -0.220352748   -0.19871930 -0.23163010 -0.014705411 -0.219583412
#> cwbrespect     -0.158870327   -0.18794601 -0.23912246 -0.302531434 -0.046167762
#> cwbtrust       -0.195313446   -0.25631494 -0.19921128 -0.193015461 -0.020712818
#> cwbmutuality   -0.088321915   -0.29349500 -0.14646969 -0.166373224 -0.165044813
#> cwbbeneficence  0.620531549    0.43950427  0.38606172  0.137158785  0.145568795
#> cwbintegrity             NA    0.49163564  0.45727433 -0.002279324  0.118005307
#> cwbcompetence   0.491635641            NA  0.56410675  0.023207494  0.061575112
#> cwbvision       0.457274332    0.56410675          NA  0.176503690  0.150409216
#> cwbrelgrowth   -0.002279324    0.02320749  0.17650369           NA  0.217487258
#> cwbfairness     0.118005307    0.06157511  0.15040922  0.217487258           NA
#> cwbsustenance   0.024314074    0.10714720  0.04493322  0.161978057  0.264153329
#> cwbachieve      0.100195406    0.13330105  0.15191987  0.156718909  0.221532638
#> cwbsatisf      -0.178872825   -0.20163368 -0.19990325 -0.158905028 -0.006509005
#> cwbvalue       -0.215949562   -0.13515301 -0.22300726 -0.135558626 -0.106802448
#> cwbbelonging   -0.076288594   -0.05527051 -0.08177368 -0.107132495  0.036033029
#> cwbwelcome     -0.149326747   -0.05604704 -0.17085044 -0.208330994 -0.061947005
#> cwbpurpose     -0.071755599   -0.09620138 -0.16770446 -0.106350306 -0.107102420
#> cwbcontrib     -0.021713752   -0.09087618 -0.12792849  0.069870994 -0.058105720
#> cwbinterconn   -0.191763136   -0.06759789 -0.06338646  0.110833742 -0.123108120
#> cwbsynergy     -0.132209068   -0.07659859 -0.04052485  0.168585664 -0.193743156
#>                cwbsustenance  cwbachieve    cwbsatisf     cwbvalue cwbbelonging
#> cwbcloserel    -0.1826264586 -0.22294685  0.226417785  0.092420812   0.10159476
#> cwbrespect     -0.1973469321 -0.24726411  0.232863969  0.045745231   0.15121917
#> cwbtrust       -0.1298370538 -0.15302974  0.420848949 -0.052703397   0.07748288
#> cwbmutuality   -0.1758520282 -0.12392604  0.268912780  0.022611406   0.02604193
#> cwbbeneficence  0.0161814164  0.05840806 -0.187967604 -0.191555700  -0.11017386
#> cwbintegrity    0.0243140745  0.10019541 -0.178872825 -0.215949562  -0.07628859
#> cwbcompetence   0.1071471975  0.13330105 -0.201633677 -0.135153009  -0.05527051
#> cwbvision       0.0449332248  0.15191987 -0.199903248 -0.223007256  -0.08177368
#> cwbrelgrowth    0.1619780566  0.15671891 -0.158905028 -0.135558626  -0.10713249
#> cwbfairness     0.2641533286  0.22153264 -0.006509005 -0.106802448   0.03603303
#> cwbsustenance             NA  0.51026243  0.014907500 -0.029568287  -0.17782562
#> cwbachieve      0.5102624330          NA -0.076781350 -0.083500002  -0.19008823
#> cwbsatisf       0.0149074997 -0.07678135           NA  0.448221195   0.14164860
#> cwbvalue       -0.0295682872 -0.08350000  0.448221195           NA   0.03981674
#> cwbbelonging   -0.1778256225 -0.19008823  0.141648596  0.039816737           NA
#> cwbwelcome     -0.1742359841 -0.18166357  0.282049854  0.148795228   0.46142304
#> cwbpurpose     -0.0512742252 -0.05670919  0.161497382  0.146793616   0.25817702
#> cwbcontrib     -0.0000895546  0.09823801 -0.064018020  0.132749429  -0.03896998
#> cwbinterconn   -0.0004735804 -0.04403197 -0.487661926 -0.001066584  -0.08983360
#> cwbsynergy     -0.0048736828  0.03440799 -0.459281548  0.089871179  -0.23825390
#>                 cwbwelcome  cwbpurpose    cwbcontrib  cwbinterconn   cwbsynergy
#> cwbcloserel     0.11337464 -0.12938183 -0.1983401553 -0.0794163220 -0.210157044
#> cwbrespect      0.26543804  0.02308694 -0.1848465593 -0.2399151853 -0.405111553
#> cwbtrust        0.15900918 -0.10022543 -0.2874318187 -0.3396922242 -0.456958372
#> cwbmutuality   -0.01556857 -0.08212507 -0.1164763503 -0.0893153957 -0.170504457
#> cwbbeneficence -0.18354411 -0.21409678 -0.0575769774 -0.0940136707 -0.089510493
#> cwbintegrity   -0.14932675 -0.07175560 -0.0217137522 -0.1917631358 -0.132209068
#> cwbcompetence  -0.05604704 -0.09620138 -0.0908761751 -0.0675978906 -0.076598591
#> cwbvision      -0.17085044 -0.16770446 -0.1279284920 -0.0633864595 -0.040524845
#> cwbrelgrowth   -0.20833099 -0.10635031  0.0698709941  0.1108337420  0.168585664
#> cwbfairness    -0.06194701 -0.10710242 -0.0581057197 -0.1231081205 -0.193743156
#> cwbsustenance  -0.17423598 -0.05127423 -0.0000895546 -0.0004735804 -0.004873683
#> cwbachieve     -0.18166357 -0.05670919  0.0982380055 -0.0440319723  0.034407989
#> cwbsatisf       0.28204985  0.16149738 -0.0640180199 -0.4876619257 -0.459281548
#> cwbvalue        0.14879523  0.14679362  0.1327494291 -0.0010665840  0.089871179
#> cwbbelonging    0.46142304  0.25817702 -0.0389699781 -0.0898335991 -0.238253901
#> cwbwelcome              NA  0.41238496  0.0355284493 -0.2526371311 -0.293890854
#> cwbpurpose      0.41238496          NA  0.1631445284  0.0279952210  0.031917219
#> cwbcontrib      0.03552845  0.16314453            NA  0.2766734938  0.405417231
#> cwbinterconn   -0.25263713  0.02799522  0.2766734938            NA  1.309221605
#> cwbsynergy     -0.29389085  0.03191722  0.4054172309  1.3092216050           NA