-1

I used the hierarchical clustering approach on my dataset and created 3 clusters, which I added as a variable to my dataset. I would like to perform the Wilcoxon Mann Whitney test on the three clusters (clusterID) and their respective variables.

This is the dataset

dataset

Hack-R
  • 22,422
  • 14
  • 75
  • 131
  • 1
    a reproducible example is always nice. also, some [links](https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test) to the statistic you're looking for (especially since it's one that goes under many names and you're using a less common name for it) and a description of what research you did before asking. – Hack-R Jul 07 '18 at 16:38

1 Answers1

1

This should do it.

Source 1: https://arxiv.org/pdf/1706.03409

# Clustered Wilcox test
clusWilcox.test(x ~ grp + cluster(cid), dat.cl, method = "rgl")

Source 2: https://www.statmethods.net/stats/nonparametric.html

# independent 2-group Mann-Whitney U Test
wilcox.test(y~A)
# where y is numeric and A is A binary factor

# independent 2-group Mann-Whitney U Test
wilcox.test(y,x) # where y and x are numeric 

# dependent 2-group Wilcoxon Signed Rank Test
wilcox.test(y1,y2,paired=TRUE) # where y1 and y2 are numeric 

Next time please include a reproducible example.

Hack-R
  • 22,422
  • 14
  • 75
  • 131