# Statistical test to find association between two variables

I'm dealing with ecological data. Broadly speaking, i've counted the plant abundance (discrete variable) in a number of points (small blocks,one number for each point).There were about 50 of a such points totally. For each point (block) we determined a substrate type (nominal variable with the two levels, e.g. substrate A and substrate B). We need to test if there is a statistical dependence between substrate type and the plant abundance. E.g. to have an opportunety to say that the plant is usually more abundant on substrate of A type. In adition, it's worth to mention that the first half of my points (points from 1 to 25) were collected in one location and points from 26 to 50 in another locations, i.e. not all of my points are independant. Which statistical test i may use in my case?

• Take a look at this reference: rcompanion.org/handbook, there is a section on choosing a statistical test, around page 135+ – Dave2e Aug 21 '19 at 18:30
• Is Abundance a count, or is it some other type of discrete variable? – Sal Mangiafico Aug 22 '19 at 15:08
• Yes, it's a count. – Denis Aug 22 '19 at 19:26
• Because of the fact, that not all of the points (blocks=replicates) are independent, i'm not able to use ANOVA. – Denis Aug 22 '19 at 19:34
• Now i'm also considering using mixed linear model with location as random effect. – Denis Aug 28 '19 at 16:09

model_full <- glm(plant_abundance ~ substrate_type + site, data=data, family="poisson")