Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

correlations

Marginal and partial correlations


Description

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.

Usage

correlations(x)

Arguments

x

a square symmetric matrix, a covariance matrix, or a data.frame for n observations and p variables.

Value

a square correlation matrix with marginal correlations (lower triangle) and partial correlations (upper triangle).

Author(s)

Giovanni M. Marchetti

References

Cox, D. R. \& Wermuth, N. (1996). Multivariate dependencies. London: Chapman \& Hall.

See Also

Examples

## See Table 6.1 in Cox & Wermuth (1996)
data(glucose)
correlations(glucose)

ggm

Graphical Markov Models with Mixed Graphs

v2.5
GPL-2
Authors
Giovanni M. Marchetti, Mathias Drton, Kayvan Sadeghi
Initial release
2020-02-014

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.