Description Usage Arguments Details Value See Also Examples
Test for the separation of two groups. The null hypothesis states that the groups are homogeneous and the alternative hypothesis states that they are separate.
1 |
group_id |
A vector of 0s and 1s 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. |
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, which is compatible with is_homo
, uclust
and
uhclust
.
For more details see Cybis, Gabriela B., Marcio Valk, and SÃlvia RC Lopes. "Clustering and classification problems in genetics through U-statistics." Journal of Statistical Computation and Simulation 88.10 (2018)
Returns a list with the following elements:
Test Statistic
Replication based p-value
Number of replications used to compute p-value
1 2 3 4 5 6 7 8 | # Simulate a dataset with two separate groups, the first 5 rows have mean 0 and
# the last 5 rows have mean 5.
data <- matrix(c(rnorm(75, 0), rnorm(75, 5)), nrow = 10, byrow=TRUE)
# U test for mixed up groups
utest(group_id=c(1,0,1,0,1,0,1,0,1,0), data=data, numB=3000)
# U test for correct group definitions
utest(group_id=c(1,1,1,1,1,0,0,0,0,0), data=data, numB=3000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.