I am trying to analyze repeated measures data and am struggling to make it work in R. My data is essentially the following, I have two treatment groups. Every subject in each group is tested everyday and given a score (the percentage correct on a test). The data is in the long format:
Time Percent Subject Group
1 0 GK11 Ethanol
2 0 GK11 Ethanol
3 0 GK11 Ethanol
4 0 GK11 Ethanol
5 0 GK11 Ethanol
6 0 GK11 Ethanol
The data resembles a logistic curve, subjects do very poorly for a few days followed by rapid improvement, followed by a plateau. I'd like to know if the treatment has an effect on the test performance curve. My thought was to use the nlmer function in the lme4 package in R. I can fit lines for each group using the following:
print(nm1 <- nlmer(Percent ~ SSlogis(Time,Asym, xmid, scal) ~ Asym | Subject,
salinedata, start = c(Asym =.60, xmid = 23, scal = 5)), corr = FALSE)
I can than compare groups by looking at the estimates for the different parameters and standard deviations of the estimated lines but I'm not sure this is the proper way to do it. Any help would be greatly appreciated.