I want to test whether there is a correlation between the spatial distances of 18 plots and the dissimilarity in their species composition. I also have information about whether they are urban (as a binary distance matrix).
I thought I could use a mantel's test but after doing some readings I think this would be inappropriate due to the spatial autocorrelation of my distance matrix. I was also hoping there might be a way to run a linear model with matrices and include whether or not the two plots are urban as a factor in the model.
Could someone please point me towards a method (preferably R based) that I could look into? I've never worked with matrices before so recommendations for basic intro books with R code would also be appreciated.
Thank you.