liveBook · Manning

Plot_correlation() function

As explained in Statistics Slam Dunk

The DataExplorer plot_correlation() function computes and visualizes pairwise correlations among dataset variables.

Use plot_correlation() to turn pairwise relationships in a data frame into a labeled correlation matrix, displayed as a heat map. It supports quick exploratory analysis before modeling. section 17.4.2

Compare betting totals with game scores

For the prepared NBA oddsdf3 data, plot_correlation(oddsdf3, type = "c") limits the heat map to continuous variables. The labels show coefficients, making it possible to compare relationships such as closetotal or opentotal with ptsR, ptsH, and ptsT. section 17.4.2

Key behaviors include:

  • Defaults to including continuous and categorical variables in the correlation heat map. section 17.4.2
  • Automatically ignores missing values while still generating the heat map. section 17.4.2

How Statistics Slam Dunk covers it

How deep it goes
Computes labeled coefficients and renders a heat map, without explaining correlation mathematics or inference.
Examples
Uses NBA betting totals, team scores, and combined points in oddsdf3 to compare observed relationships.
What you can do after
Evaluate/understand variable relationships through a labeled correlation heat map.
How it connects
Connects correlation analysis with heat maps, continuous variables, categorical variables, missing values, and data profiling reports.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.