Is Mann Whitney U the right statistical test for this analysis? I am studying the spatial interactions between coral at a specific reef. I have the abundances of each coral species at each site we studied. I also have already run statistical tests and basically have finalized which coral species are in significant interactions with other coral species at each site. I now want to see if abundance of coral species has any impact on if they are in a significant interaction for each site. I have turned to the Mann Whitney U test as my data is not normalized and I have unequal sample sizes. For example I have made up some fake data for what this looks like:




Site Number
Abundance
Significance




1
24
yes


2
2
no


3
10
yes


4
8
no


5
34
yes


6
17
yes


7
4
no


8
5
yes


9
4
no


10
25
yes




I have then run this code:
wilcox.test(Abundance ~ Significance, data = dat, exact = F)

This is to see if there is a statistical significance between the abundances of this coral species when in a significant interaction and when not.
Is this a good way about doing this or should I be doing a different statistical test?

You are dealing with count data, so technically the MW test (equivalently Wilcoxon rank sum), which deals with continuous outcomes, would not be the theoretically "correct" method. There are a wide-variety of procedures for dealing with count data and many of the R approaches to these have a nice treatment in Zeileis,Kleiber, and Jackman's paper.
A Poisson regression approach might coded as:
 glm(Abundance~Significance, data=dat, family="poisson")

Call:  glm(formula = Abundance ~ Significance, family = "poisson", data = dat)

Coefficients:
    (Intercept)  Significanceyes  
          1.504            1.449  

Degrees of Freedom: 9 Total (i.e. Null);  8 Residual
Null Deviance:      81.64 
Residual Deviance: 36.61    AIC: 81.46
> summary(glm(Abundance~Significance, data=dat, family="poisson"))

Call:
glm(formula = Abundance ~ Significance, family = "poisson", data = dat)

Deviance Residuals: 
    Min       1Q   Median       3Q      Max  
-3.8595  -1.1201  -0.2403   1.2196   3.0512  

Coefficients:
                Estimate Std. Error z value Pr(>|z|)    
(Intercept)       1.5041     0.2357   6.381 1.76e-10 ***
Significanceyes   1.4491     0.2535   5.717 1.08e-08 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for poisson family taken to be 1)

    Null deviance: 81.637  on 9  degrees of freedom
Residual deviance: 36.606  on 8  degrees of freedom
AIC: 81.463

Number of Fisher Scoring iterations: 4

