anscombe.extended {multivariance} | R Documentation |
Extended Anscombe's Quartett
Description
The dataset extends 'anscombe' provided in the standard R-package 'datasets'. All examples feature the same correlation of 0.82, but different types of dependencies. The main aim was to extend the classical examples, which have sample size 11, to larger sample sizes. This illustrates that the implied problems of Pearson's correlation are not small sample problems! Distance multicorrelation (which coincides in this case with distance correlation) yields different values for the datasets.
Usage
anscombe.extended
Format
list
with elements:
anscombe.extended$N11
matrix with 11 samples for 5 examples the first 4 are the classical Anscombe Quartett, the fifth is a monoton relation which also features the same correlation.-
anscombe.extended$N100
same as above but 100 samples -
anscombe.extended$N1000
same as above but 1000 samples
Details
Note: Anscombe's quartett features further identical parameters besides Pearson's correlation. The extended set is only concerned with correlation.
References
This example was introduced in the reference [6] given on the main help page of this package: multivariance-package.
Examples
# Code which generates plots of all included data:
op = par(mfrow = c(3,5),mar = c(0.5,0.5,3,0.5))
for (name in c("N11","N100","N1000")) {
for (i in 1:5) {
x = anscombe.extended[[name]][,2*i-1]
y = anscombe.extended[[name]][,2*i]
plot(x,y,main = paste0("cor = ",round(cor(x,y),2),
"\n Mcor = ",round(multicorrelation(cbind(x,y),type = "pairwise",squared = FALSE),2),
"\n CMcor = ",round(copula.multicorrelation(cbind(x,y),type = "pairwise",squared = FALSE),2)),
axes = FALSE,xlab ="",ylab = "", cex.main=1)
# for two variables 'pairwise' coincides with
# both values of 'total.upper.lower'.
box()
}
}
par(op)