View source: R/bootD_equalSS.R
bootD_equalSS | R Documentation |
Unequal sample sizes can skew estimates of group differences. This function
takes two numeric vectors, x
and y
, and repeatedly calculates
Cohen's d for the difference in means. On each iteration the smaller of the two vectors
is used whole, while the larger of the two vectors is randomly subsampled with the same number
of elements as the smaller vector (NAs excluded). Several
quantiles of the resampled distributions of Cohen's d
are returned, along with the true mean difference.
bootD_equalSS(x, y, nBoot = 2000)
x |
The first vector |
y |
The second vector |
nBoot |
The number of bootstrap iterations |
x <- c(NA,rnorm(3000,.5))
y <- rnorm(30)
bootD_equalSS(x,y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.