Description Usage Format Details References Examples
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.
1 |
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
Note: Anscombe's quartett features further identical parameters besides Pearson's correlation. The extended set is only concerned with correlation.
This example was introduced in the reference [6] given on the main help page of this package: multivariance-package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.