Description Usage Arguments Details Value Note Author(s) References Examples
Bootstrap the estimated overlapping area of two or more kernel density estimations from empirical data.
1 | boot.overlap( x, B = 1000, ... )
|
x |
list of numerical vectors to be compared; each vector is an element of the list |
B |
integer, number of bootstrap draws |
... |
options, see function |
If the list x
contains more than two elements (i.e. more than two distributions) it computes bootstrap overlapping between all q number of paired distributions. For example, if x
contains three elements, then q = 3; if x
contains four elements, then q = 6, and so on.
It returns a list containing the following components:
OVboot_stats |
Data frame q \times 3; each row containing the following statistics:
|
OVboot_dist |
Matrix B \times q, |
Call function overlap
.
Massimiliano Pastore
Pastore, M. (2018). Overlapping: a R package for Estimating Overlapping in Empirical Distributions. The Journal of Open Source Software, 3 (32), 1023. URL: https://doi.org/10.21105/joss.01023
Pastore, M., Calcagnì, A. (2019). Measuring Distribution Similarities Between Samples: A Distribution-Free Overlapping Index. Frontiers in Psychology, 10:1089. URL: https://doi.org/10.3389/fpsyg.2019.01089
1 2 3 4 5 6 7 8 9 10 11 12 13 | set.seed(20150605)
x <- list(X1=rnorm(100), X2=rt(50,8), X3=rchisq(80,2))
## bootstrapping
out <- boot.overlap( x, B = 10 )
out$OVboot_stats
# bootstrap quantile intervals
apply( out$OVboot_dist, 2, quantile, probs = c(.05, .9) )
# plot of bootstrap distributions
Y <- stack( data.frame( out$OVboot_dist ))
ggplot( Y, aes( values )) + facet_wrap( ~ind ) + geom_density()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.