Description Usage Arguments Value Author(s) References See Also Examples
Computes a correlation matrix with ones along the diagonal, marginal correlations in the lower triangle and partial correlations given all remaining variables in the upper triangle.
1 | correlations(x)
|
x |
a square symmetric matrix, a covariance matrix, or a data.frame for n observations and p variables. |
a square correlation matrix with marginal correlations (lower triangle) and partial correlations (upper triangle).
Giovanni M. Marchetti
Cox, D. R. \& Wermuth, N. (1996). Multivariate dependencies. London: Chapman \& Hall.
1 2 3 | ## See Table 6.1 in Cox & Wermuth (1996)
data(glucose)
correlations(glucose)
|
Loading required package: igraph
Attaching package: 'igraph'
The following objects are masked from 'package:stats':
decompose, spectrum
The following object is masked from 'package:base':
union
Attaching package: 'ggm'
The following object is masked from 'package:igraph':
pa
Y X Z U V W
Y 1.00000000 -0.24445785 0.09354755 -0.12798823 0.087942794 -0.249825305
X -0.34075247 1.00000000 -0.33532889 -0.07963908 0.039741792 0.003602872
Z 0.14979043 -0.49115395 1.00000000 0.40922980 -0.258331690 0.275120429
U 0.02734320 -0.32472715 0.52054597 1.00000000 -0.085859607 -0.076665692
V 0.04199025 0.14178114 -0.33278493 -0.22852134 1.000000000 0.158985954
W -0.12238307 -0.11024991 0.27522852 0.09900332 0.047259359 1.000000000
A -0.31889444 0.33331537 -0.25667957 -0.19593153 -0.005196467 -0.250207430
B -0.06634013 0.08617909 0.07599028 -0.06409980 -0.221254867 0.071501311
A B
Y -0.288992196 -0.05320535
X 0.174071199 0.13665929
Z -0.002712233 0.08902947
U -0.119850983 -0.14027029
V -0.068351329 -0.22966551
W -0.248252892 0.03783576
A 1.000000000 -0.13733490
B -0.085404874 1.00000000
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.