corranalysis: Correlation analysis

View source: R/corranalysis.R

corranalysisR Documentation

Correlation analysis

Description

Correlation analysis

Usage

corranalysis(data, threshold = 0, sig.level = 0.95)

Arguments

data

a numeric matrix or data frame (see cor).

threshold

numeric, correlation cutoff (default 0); correlations in absolute value below threshold are set to 0.

sig.level

numeric, significance level (default 0.95); correlations with p-values greater that 1-sig.level are set to 0.

Value

A list with the following elements:

  • corr.mtx (the complete correlation matrix)

  • corr.mtx.trunc (the truncated correlation matrix)

  • cor.mtest (the output of the significance test on correlations; see cor.mtest)

  • threshold correlation cutoff

  • sig.level significance level

Author(s)

Marco Sandri, Paola Zuccolotto, Marica Manisera (basketballanalyzer.help@unibs.it)

References

P. Zuccolotto and M. Manisera (2020) Basketball Data Science: With Applications in R. CRC Press.

See Also

plot.corranalysis.

Examples

data <- data.frame(Pbox$PTS,Pbox$P3M,Pbox$P2M,
                   Pbox$OREB + Pbox$DREB,Pbox$AST,
                   Pbox$TOV,Pbox$STL,Pbox$BLK)/Pbox$MIN
names(data) <- c("PTS","P3M","P2M","REB","AST","TOV","STL","BLK")
data <- subset(data, Pbox$MIN >= 500)
out <- corranalysis(data, threshold = 0.5)

sndmrc/BasketAnalyzeR documentation built on June 6, 2023, 12:52 a.m.