Description Usage Arguments Details Value See Also Examples
Test for the separation of three groups. The null hypothesis states that the groups are homogeneous and the alternative hypothesis states that at least one is separated from the others.
1 |
group_id |
A vector of 1s, 2s and 3s indicating to which group the samples belong. Must be in the same order as data or md. |
md |
Matrix of distances between all data points. |
data |
Data matrix. Each row represents an observation. |
alpha |
Significance level |
numB |
Number of resampling iterations. |
Either data
or md
should be provided.
If data are entered directly, Bn will be computed considering the squared Euclidean
distance.
For more detail see Bello, Debora Zava, Marcio Valk and Gabriela Bettella Cybis. "Clustering inference in multiple groups." arXiv preprint arXiv:2106.09115 (2021).
Returns a list with the following elements:
Logical of whether test indicates that data is homogeneous
Replication based p-value
Test Statistic
Standard error for Bn statistic computed through resampling
1 2 3 4 5 6 7 | # Simulate a dataset with two separate groups,
# the first row has mean -4, the next 5 rows have mean 0 and the last 5 rows have mean 4.
data <- matrix(c(rnorm(15, -4),rnorm(75, 0), rnorm(75, 4)), nrow = 11, byrow=TRUE)
# U test for mixed up groups
utest3(group_id=c(1,2,3,1,2,3,1,2,3,1,2), data=data, numB=3000)
# U test for correct group definitions
utest3(group_id=c(1,2,2,2,2,2,3,3,3,3,3), data=data, numB=3000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.