I am trying to analyse some data in R that has one continuous dependent variable (x) and two categorical variables (sex: M/F, surface: D/V). My main goal is to understand if sex and surface affect 'x'. Biologically, I am interested in whether
- male dorsal surfaces have more 'x' than male ventral (similar for females) and if
- male dorsals have more 'x' than female dorsals (similar for the ventrals).
This is for 10 different species. Here is where I am confused
- Do I carry out a GLM of the form: 'x~Sex*Surface' per species and then carry out pairwise comparisons using 'emmeans' to find out specific differences? Or
- Can I combine sex and surface into one categorical independent variable which has four levels and carry out Kruskal-Wallis or ANOVAs individually per species as some species satisfy assumptions while others dont.
Alternatively, can I carry out a GLM followed by emmeans with the combined variable instead of keeping sex and surface separate i.e., 'x~SexSurface'?
Conceptually they seem similar to me and so I am unable to decide which method would be best suited for this analysis.