corr.plot: Correlation Coefficients and Scatter Plots

View source: R/ch5-fn.R

corr.plotR Documentation

Correlation Coefficients and Scatter Plots

Description

Correlation Coefficients and Scatter Plots of Discrete Random variables

Usage

corr.plot(X, Mt, item, dig = 4, prt = TRUE, pprt = FALSE,
  plot = FALSE)

Arguments

X

Sample space vector of X

Mt

Plot title

item

Names of random variables

dig

Number of effective digits, Default: 5

prt

Print the result? Default: TRUE

pprt

Print frequency tables? Default: FALSE

plot

Plot the PDF and scatter plots? Default: FALSE

Value

None.

Examples

S = rolldie2(4)
item = c("Sum", "Max", "Min", "Range")
X = list()
X[[1]] = apply(S, 1, sum)
X[[2]] = apply(S, 1, max)
X[[3]] = apply(S, 1, min)
X[[4]] = X[[2]]-X[[3]]
Mt = paste("PDF of", item, "in 4 Dice")
corr.plot(X, Mt, item, pprt=T, plot=T)

adoocavo/Rstat_M1 documentation built on March 19, 2022, 3:34 a.m.