I am looking for some statistical solution to the problem of testing the similarity of curves. I am working with multiply time series (sort of survival curves). The curves are calculated as a separate curves for different values of a categorized continuous variable. For example:
I want to test which of the curves are equal and can be combined in one curve. I know that there are some r packages that use distance measure to cluster curves, such as tsclust.
What i need is an algorithm that takes into account that only curves form adjacent intervals of a class variables can be matched. It needs to be automatic as i have many curves and many class variables.