Alternatives to ANCOVA? Unequal slopes.

Hello, and thank you for your help on my question.

My goal is to compare multiple groups to determine if a certain "variable of interest" is different between different groups (in the example below: blue, red, and orange). Normally, this statistical test could be solved with an ANOVA, but the "variable of interest" is influenced by a co-variate (in the example below this is speed). In this case, an ANCOVA would be the appropriate test, but the data I am working with has two groups that are influenced by speed (blue and red) and one variable that is not influenced by speed (orange). Obviously this violates the assumptions of an ANCOVA, but I am unclear as what to do in order to compare the groups to each other.

I appreciate any advise on this issue. Thank you so much.


View attachment 5758


Ambassador to the humans
You can always fit a linear model with terms for group, velocity, and the group*velocity interaction. This basically allows all the groups to have their own line (with different slopes) but still makes an equal variance assumption.
Exactly, e.g. using the nlme package in R you can nicely combine various random structures (e.g. random intercept and slope models) with various variance structures in the context of GLS, for example coupling the variance to a continuous predictor or allowing the variance to vary between levels of a categorical predictior.


Ambassador to the humans
Of course there are ways to overcome this. I don't see it as a "problem" that needs to be overcome unless there is evidence against the idea of the variances being equal. But I did want to make sure that it was clear that by using a linear model in this way there still is a default assumption of equal variance.