0
$\begingroup$

I have a dataset of the lengths of a species which has a 1-year lifespan, going back 20 years. I would like to test if the lengths recorded each year are significantly different from one another (for each sex, we already know that there is a difference between the sexes).

My length data does not have a normal distribution; therefore, I was thinking of using the Kruskal-Wallis test. However, I am not sure if that is the right way forward for the following reasons:

1) It requires an ordinal scale for the dependent variable, and I am unsure if this applies to length data

2) Is it okay that I am treating the years as a 'group' in this case? I would have ~20 groups.

3) Biologically speaking, I know that each year we are measuring different population, as this species spawns and dies (in a different location to where they are sampled) and the data is temporally independent. However, is there a way to prove this statistically? I attempted running the autocorrelation function in R but I am unsure if that is the way to go?

Many thanks!

$\endgroup$
  • $\begingroup$ How comes your lengths are not normally distributed? Because discrete ages? $\endgroup$ – KaPy3141 Oct 21 '19 at 14:00
  • $\begingroup$ @KaPy3141 Lengths will tend to be right skew. They certainly can't actually be normally distributed because lengths cannot be negative. $\endgroup$ – Glen_b Oct 21 '19 at 14:03
  • 1
    $\begingroup$ Lengths are ratio scale; Kruskal-Wallis should not have a problem (though personally I'd probably consider a generalized linear model). It's not clear that lengths are necessarily independent across years since the population in one year is descended from the population in the previous year. $\endgroup$ – Glen_b Oct 21 '19 at 14:04
  • $\begingroup$ @Glen_b: Thanks, I get it! $\endgroup$ – KaPy3141 Oct 21 '19 at 14:25
  • $\begingroup$ @Glen_b, thank you for the response, how would you suggest dealing with autocorrelation if I was to find that this is the case? Would a generalised least squares as described here - rpubs.com/markpayne/164550 applicable? $\endgroup$ – watermineporcupine Oct 21 '19 at 16:33
1
$\begingroup$

1): It doesn't need ordinal variables. Your R implementation automatically ranks your variables which makes them ordinal.

2): Yes, that's ok. Just be aware of additional biases than gender. (age distribution)

3) Yes, you can do a regression of your choice. For example linear regression to show that there is no linear time dependence.

(I am not a statistics expert myself, but I am quite confident this should be correct)

| cite | improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Could you explain how you're using linear regression to show there's no autocorrelation in "3)"? $\endgroup$ – Glen_b Oct 21 '19 at 14:07
  • $\begingroup$ I referred to the first part of the question: If there is a way to analyze temporal dependence. The answer is there are multiple ways. Just the result needs to be interpreted differently! (Linear for linear effect, auto-correlation for year-to-year effect) $\endgroup$ – KaPy3141 Oct 21 '19 at 14:18
  • $\begingroup$ @KaPy3141 Thanks for the info! $\endgroup$ – watermineporcupine Oct 21 '19 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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