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

chart.Correlation

correlation matrix chart


Description

Visualization of a Correlation Matrix. On top the (absolute) value of the correlation plus the result of the cor.test as stars. On bottom, the bivariate scatterplots, with a fitted line

Usage

chart.Correlation(
  R,
  histogram = TRUE,
  method = c("pearson", "kendall", "spearman"),
  ...
)

Arguments

R

data for the x axis, can take matrix,vector, or timeseries

histogram

TRUE/FALSE whether or not to display a histogram

method

a character string indicating which correlation coefficient (or covariance) is to be computed. One of "pearson" (default), "kendall", or "spearman", can be abbreviated.

...

any other passthru parameters into pairs

Note

based on plot at originally found at addictedtor.free.fr/graphiques/sources/source_137.R

Author(s)

Peter Carl

See Also

Examples

data(managers)
chart.Correlation(managers[,1:8], histogram=TRUE, pch="+")

PerformanceAnalytics

Econometric Tools for Performance and Risk Analysis

v2.0.4
GPL-2 | GPL-3
Authors
Brian G. Peterson [cre, aut, cph], Peter Carl [aut, cph], Kris Boudt [ctb, cph], Ross Bennett [ctb], Joshua Ulrich [ctb], Eric Zivot [ctb], Dries Cornilly [ctb], Eric Hung [ctb], Matthieu Lestel [ctb], Kyle Balkissoon [ctb], Diethelm Wuertz [ctb], Anthony Alexander Christidis [ctb], R. Douglas Martin [ctb], Zeheng 'Zenith' Zhou [ctb], Justin M. Shea [ctb]
Initial release
2020-02-05

We don't support your browser anymore

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