View source: R/dist_mean_boot.R
dist_mean_boot | R Documentation |
Computes bootstrapped estimates of the mean distance between two groups and their confidence intervals.
dist_mean_boot(A, B, boot = 1000, ci = 0.95, nA = nrow(A), nB = nrow(B))
A , B |
Matrices or data frames containing data (observations in rows, variables in columns). |
boot |
number of bootstrap resamples |
ci |
width of the confidence interval |
nA , nB |
sample sizes for each bootstrapped group (defaults to original sample size) |
This may be useful to compare whether the differences between two groups are larger or smaller than differences between two other groups.
For instance, if we wanted to quantify shape sexual dimorphism in two populations, we could run this analysis separately for the two populations and then check the confidence intervals. If the two confidence intervals are disjunct there is evidence for the two populations having different levels of sexual dimorphism.
The computation performs bootstrap by resampling with replacement within each of the two groups and at each round computing the Euclidean distance between the two groups. It is also possible to resample at a different sample size than the one in the data using the attributes nA and nB.
Notice that the confidence interval is expressed on a scale between 0 and 1 and not as a percentage (e.g., 0.95 means 95
The function outputs a named vector with the mean, median, upper and lower confidence interval bounds obtained from the bootstrapped samples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.