6
$\begingroup$

I am currently in the process of writing a publication about the home range of cat shark species in South Africa. However, I am currently struggling with how to create an interaction model of shark species, maturity level and sex, and their effect on the average travel distance within the study region. I was hoping to gain a test statistic (non-parametric) and p value for each category (e.g. mature male leopard shark, mature female leopard shark, immature male leopard shark, etc.). To do this I have tried a gaussian GLM though this does not give me the output I'm looking for since I'm using 3 fixed factors and no covariates. I've also tried a Scheirer-Ray-Hare test, though this only allows for 2 factors. Does anyone have any ideas of what test I could potentially use?

$\endgroup$
9
  • $\begingroup$ Why do you state that the GLM does not give you want you want? I suspect you wanted to fit it with all the two-way interactions and a three-way but that does not mean you need covariates. $\endgroup$
    – mdewey
    Commented Jun 6, 2022 at 16:16
  • 1
    $\begingroup$ I am very confused by the output on R as it gives me 2 three-way interactions (male mature leopard sharks, and male mature pyjama sharks). If it only gave one interaction model, or every interaction model this wouldn't be an issue. There isn't anything wrong with the code as I have checked on stackoverflow. $\endgroup$ Commented Jun 6, 2022 at 16:24
  • 1
    $\begingroup$ Do you have data for every combination of sex, maturity and species? $\endgroup$
    – mdewey
    Commented Jun 6, 2022 at 17:02
  • $\begingroup$ I do yes, I've removed a shark species from the model because there wasn't enough data $\endgroup$ Commented Jun 6, 2022 at 17:07
  • 1
    $\begingroup$ You can specify the model formula so that it omits the 3-way interactions in your GLM, if those aren't relevant to your study. Your choice of parametric versus other types of models (e.g., proportional odds) should be based on which type of model best matches the characteristics of your data. $\endgroup$
    – EdM
    Commented Jun 6, 2022 at 17:43

4 Answers 4

8
$\begingroup$

ANOVA, even a 3-way ANOVA, is a special case of linear regression.

For one-way ANOVA, the typical "nonparametric" flavor is the Kruskal-Wallis test, so it seems like you would want some kind of 3-way Kruskal-Wallis test.

Much as ANOVA is a special case of linear regression, the Kruskal-Wallis test is a special case of proportional odds ordinal logistic regression.

Consequently, there is a sense in which the nonparametric flavor of 3-way ANOVA is a proportional odds ordinal logistic regression model on the variables, their two-way interactions, and their three-way interactions, much as the parametric flavor of 3-way ANOVA would be linear regression on the variables, their two-way interactions, and their 3-way interactions.

This is the first I've heard of the Scheirer-Ray-Hare test, but its Wikipedia article makes it sound like it can handle any number of factors, not just two, so perhaps your inability to include three factors is a software issue. Additionally, the Wikipedia article makes it sound like the Scheirer-Ray-Hare test is another special case of the proportional odds ordinal logistic regression.

$\endgroup$
3
  • $\begingroup$ Thank you, I've also had a look at the ordinal logistics regression though I'm not sure how this would work as my dependent variable is continuous and not ordinal. Is there a different kind I should consider? $\endgroup$ Commented Jun 6, 2022 at 16:52
  • 2
    $\begingroup$ @TomJohnson All ordinal means is that your data can be ordered, which (presumably) yours can be. This post and rebuttal are worth reading. $\endgroup$
    – Dave
    Commented Jun 6, 2022 at 17:25
  • $\begingroup$ Thanks @Dave, I will give it a go $\endgroup$ Commented Jun 7, 2022 at 6:52
3
$\begingroup$

The exchange in comments now makes this clearer. The OP has three species of shark, two level of maturity, and two sexes of shark. This forms a $3\times2\times2$ design. There will be 2 degrees of freedom for species, 1 for sex, 1 for maturity. There will be 2 for species by sex, 2 for species by maturity, and 1 for sex by maturity. By calculation or by subtraction from the overall total we can see that this leaves 2 for the three way-interaction. So R is correct in printing out just two terms for the three-way interaction. It chooses male mature leopard sharks and male mature pyjama sharks as the comment suggests.

$\endgroup$
1
$\begingroup$

You can do an anova per permutation (non-parametric) with the aovp function from lmperm package. I suggest you use perm = "exact", to have a more robust test. For a following post hoc test you can also use pairwise.perm.t.test from RVaideMemoire package (it allows you to do a correction, and to defined the number of permutation you wish).

This is what I have used so far and it worked quite well...

Cheers

$\endgroup$
0
$\begingroup$

Just to add to the other answers, a relatively flexible method for non-parametric multi-way anova is aligned ranks transformation anova (ART anova).

At least in the implementation in R, it can handle mixed effects and has methods for post-hoc analysis.

It has its limitations, so it's important to read up on the background and documentation.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.