I have data that looks something like this:
I was hoping to run ancova, but the data is not linear in the continuous variable, and there isn't an obvious transform to apply.
However, each group is roughly a shifted version of the other (I have drawn it more stark than it actually is, to highlight this point: the data is more messy). I bring this up partly because I wonder if there is some trick/transform that can be done to turn this into a valid ancova problem.
If not, what kind of analysis am I looking at if I want to know if there is an effect of group, and of the continuous variable, on the dependent variable?
One thing I have thought of is just binning the continuous variable into bins large enough such that the continuous variable isn't changing within a bin, and run 2-way anova. This seems sort of cheap, but would work and be simple and easy, and so is what I'm leaning toward.
[Edit: I was initially thinking I could shift them all to the dataset mean, do a spline interpolation, and subtract each data point from this spline. I could then reverse the shift for each group and run ancova on this transformed data. I now see that's invalid because that would destroy any chance of finding dependence on the covariate, as it would effectively make the line flat, even if there is clearly strong dependence on the covariate.]
