I'm analysing data from a repeated-measures study, in two participant groups (call them patient and control groups).
I have measured a dependent variable response. Both the patient and control groups received a range of quantifiable treatment doses at different times. Because dose is a continuous variable, I understand that I need to use ANCOVA, rather than a repeated measures ANOVA, to analyse the data (since repeated measures ANOVA would treat the different doses as categorical data, not continuous).
So far so good. I am currently interested in finding out whether the between subjects factor "control/patient" affects the response. I can construct an ANCOVA with dose as a covariate, and control/patient as a fixed factor. However, since my data table is arranged in a long format (one observation per row), I need to tell the model to take into account the fact that multiple observations (i.e. at different doses) come from the same participant. I can do this by adding participant_id into the model as a fixed factor. This is where I hit a problem: I cannot run my model because the coefficients patient/control and participant_id are aliased.
I'm doing this in both JASP and R (I tend to use both to double-check). I understand why the coefficients are aliased: any given participant_id only belongs to one group (patient or control). Not both. So JASP (and R) complain because they are trying to work out the relationship between these two variables. But, I don't care to know the relationship between the two, I only really care to know whether control/patient is affected, but I somehow need to tell the model to recognise that multiple observations come from the same observer.
I know I could restructure my data into a wide format (repeated measures on the same row), but then I couldn't run it as an ANCOVA in JASP (or, I think, R). So how do I avoid the error message about coefficient aliasing?
One other thing - there are equal numbers of observations from each participant. So perhaps I needn't worry at all about including participant_id in the model?