3-way ANOVA for paired groups and repeated measures or a GEE

Hi! I need help for data analysis of my masters.I work with awake rats in pharmacology experiments. In my experiment I have some groups of treatment and I want to see the effects of the different combinations of treatment with 3 drugs upon the repiratory frequency (fR) during a periode of time (40 seconds). During this 40 seconds I measure the fR every 2 seconds, so I have 20 points of fR. For the stimulation of the respiratory frequency I have to infuse an other substance (A), however I infuse in the same animal 4 differents doses of this substance (A).

So in my experiment I have 3 factors of treatment and I want to see the effects of each one and the interaction among them on the respiratory frequency, wich is a repeated measure. however, as I have these 4 doses of substance (A) for each subject, then I have a paired groups of fR for each point of time (20 points).

I had an statistic course this week and the professor said that I should analyze my data as a 3 way-ANOVA for repeated measure for each doses of substance (A) and in a separate analysis a Friedman test for the 4 doses of (A). Or I should look in linear models and in GEE, but he isn't an expert in the area.

Have anyone an idea about how can I analyze my data? thank every one
Hi, I am still a bit confused about the design, you have three possible drugs and additionally 4 different doses of substance A, and do you use always only one drug and only one dose of (A) for the 20 measurements? However, as far as I see you should use a mixed regression model instead of am ANOVA, since your multiple measurements in time could show autocorrelation. Thus, I recommend a regression model with fR as the outcome, "drug" and "substance A" as two factor predictors (with the levels of "drug" specify the type of drug and the levels of "substance A" specify the dose of A), an interaction between them, and "rat ID" as a random factor. Finally, the residuals of this regression model should be checked for autocorrelation (via the pacf-plot), and if significant autocorrelation exists, you should integrate a corresponding autocorrelation structure within the regression model.
In my lab we saw that rats which were intoxicated with CPF (an inseticide) they have an impairment upon the chemoreflex response. the chemoreflex is a cardiorespiratory reflex activated in some situations. When activated, it increase the respiratory frequency (fR). In my lab we use the substance (A) for stimulation of the chemoreflex, and then compare the response of the chemoreflex between groups of treatment. So, if we compare the global response we are able to that those rats, which were intoxicated had a smaller response in fR than those of the control group. We infuse in bolus (i.v.) 4 doses "A". As much higher is the dose much higher is the response (dose-response). For each subject we have 4 responses. In my masters we decide to test 2 antidotes to see whether they would be able to restore thoses responses! (antidote 1 (a-1) and antidote 2 (a-2). after a periode of time after the intoxication I treated the rats with these antidotes. So, we have these groups of treatment: Control, CPF, CPF + a-1, CPF + a-2, CPF + a-1 + a-2, Control + a-1, Control + a-2, Control + a-1 +a-2.

with this we have 3 factors of treatment: CPF, a-1 and a-2. we also have paired responses (4 doses of "A"). For each global response o fR we have 20 measures of fR. every 2 seconds we a mean creating a point until a total of 40 seconds. so, it would be a repeated measure.

thank for your help! and i'm sorry about my english! i'm from Brazil and i'm still doing an english course