I've noticed in a large ecological dataset that when I subsample my data, the R2 'proportion of variance' explained by my categorical grouping (output from adonis()
within the vegan package) gets larger. That is, when I have fewer samples, that R2 increases. Naively, I think that because more samples equates to having greater statistical power, the idea that more samples underestimates (or fewer samples overestimates) the proportion of variance explained by my variable of interest seems paradoxical to me. Could someone help explain this? Also, does this mean comparing R2 for datasets of different sizes is inappropriate? F statistics go down with fewer numbers, so at least that seems to make sense.
Ex.:
birds <- read.csv('https://raw.githubusercontent.com/collnell/lab-demo/master/bird_by_fg.csv')
bird.matrix <- as.matrix(birds[,3:9])
bird.dist <- vegdist(bird.matrix, method='bray')
adonis(bird.dist~DIVERSITY, data=birds, permutations = 999, method="bray")
The full dataset is 32 rows and R2 for that is calculated above. However, the mean R2 scores get larger when subsampling down to 20 (and further down to 15):
set.seed(7*11*13)
R2scores <- vector(mode="numeric")
for (i in 1:50)
{
sampsize=20
randsamp <- sample(1:32, sampsize, replace=F)
bird.matrix <- as.matrix(birds[randsamp,3:9])
bird.dist <- vegdist(bird.matrix, method='bray')
ad1 <- adonis(bird.dist~DIVERSITY, data=birds[randsamp,], permutations = 10000, method="bray")
R2scores <- c(R2scores,ad1$aov.tab[1,5])
}
mean(R2scores)
This is also very evident in my dataset of ~1400 samples. Any help would be greatly appreciated!