I'm currently working on a problem, where I want to test weather there is a trend in the course of a certain metric in an animal, where I wanted to use something like the Mann-Kendall test. The problem is that I have data for multiple animals, which presumably have different starting values.
Therefore I think it is not wise compare all data points with each other but rather only data points of the respective animal with each other but I still want a result across all animals, e.g. the value decreases over time in all animals (with some tau value).
Is there a good way of doing it? My Idea would be to modify the Mann-Kendall so that the mean of the rank difference is not taken across all possible pairs of permutation but rather only on the pairs of the same animal. But then also the variance has to be changed which seemed to me quite tedious to calculate and was probably done already. Does anybody know a source to that or how it is called? Or is there a better way of doing it?
Thanks for your detailed response.
Regarding
A parametric model might be more powerful and more informative. A parametric model can provide information about the magnitude and linearity of the trend, not just whether it's "statistically significant."
I could find different opinions on weather to use parametric or non-parametric tests. My current consense out of all what I read is that one should use parametric tests if there is reason to believe that the requirment is meet, i.e. most of the time some sort of normality assumption and else use non-parametric although parametric are often quite good also for not normality distributed data but are usaly outperformed by non-parametric test in this scenario. For my case there is no good reason to assume why the data should be normal distributed i even expect the error is more leaning to one side then to the other.
Furthermore I'm at the moment mainly interested in testing for trends in the data and i'm not sure weather they are linear.
Model time flexibly, for example with restricted cubic regression splines. You can then test whether there is evidence of a significant non-linear component to the trend.
This maybe solves this problem but i don't have any experience with such test and have to look into it.
Do separate Mann-Kendall tests on each of the animals. Get the normalized score value for each animal (S divided by square root of var(S), both provided by the MannKendall() function in the Kendall package). Determine whether the mean of the normalized score value over all animals is different from 0 via a one-sample t-test.
This works independent to the sample size? Because i only have 4 animals in total.
I just read about the seasonal mann Kandell test, this should yield similar results to your proposed method right? (each animal is one season)