I have a dataset on bugs that has been processed to incorporate a series of traits (e.g. size; feeding habitats) through displaying proportional values of different properties (e.g. small, medium, large; herbivore, carnivore). Each trait adds to 1. As a broad example, if a bug is very likely to be 'small', rarely 'medium' in size and never 'big', it could possess values of 0.9, 0.1, 0, respectively. Bugs were sampled from different habitats. Here is an example dataset.
gradient <- 1:99 Small <- gradient * 0.005 Medium <- gradient * 0.004 Large <- 1 - (Small + Medium) Herbivore <- gradient * 0.005 Carnivore <- 1 - (Herbivore) Habitat <- rep(c("Grass","Sand","Gravel"), each = 3) df <- data.frame(Habitat = Habitat, Small = Small, Medium = Medium, Large = Large, Herbivore = Herbivore, Carnivore = Carnivore)
Is there an effective way to characterise the dominant properties within each habitat? Potentially a list of the top three properties related to each habitat, e.g. (in order of likelihood)
large, herbivore, small. Within grass. small, large, carnivore. Within sand. large, carnivore, medium. Within gravel.
I originally looked into 'multipatt' within the indicspecies package, I get NAs for a lot of traits because they a most likely to be related to ALL habitats. I didn't get nice outputs for specific habitats. SIMPER analysis seems difficult to interpret for several factors (i.e. if there are numerous habitats). I read this blog, that outlined a function based on the 'bioenv' function in the vegan package, but I'm not sure of its validity.