02-04-2018 02:39 PM - edited 02-04-2018 02:40 PM
I am stuck to conduct two-way repeated measures ANOVA with two within-subject factors (Treatment and Time).
This data is just an example, but in this study 5 subjects join a study session three times. In each session, they are assigned one of the three kinds of test food (treatment) and their appetite is measured at 0, 15 and 30 minute points after the test food consumption.
Please find the excel file attached.
I would like to examine the treatment effect, time effect and interaction effect on appetite score, as well as at which time point the appetite score significantly differs between treatments (if there is a significant effect of treatment).
It would be really helpful if you could provide me with code that I can examine these. I want to know the code for normal (?) proc GLM procedure with two within subject factors, but also want to compare the result with that of proc MIXED repeated growth curve model (considering Time as continuous variable).
Thank you in advance,
02-04-2018 06:09 PM
proc glm; classes group; model Y1-Y12=group / nouni; repeated trt 3, time 4; run;
For the second question(https://communities.sas.com/t5/SAS-Statistical-Procedures/Two-within-subject-factors-repeated-measur...), there is no factor that is analogous to "group" (between subject factor). There are just two within-subject factors. How should I modify this code?
02-04-2018 07:13 PM
I moved the post from https://communities.sas.com/t5/SAS-Statistical-Procedures/PROC-GLM-repeated-measures-one-class-two-m... to keep threads tidy.
I would not use the GLM procedure. I think in terms of mixed models, and the model for this study could be constructed as a split-plot design, with whole plots (sessions) in blocks (subjects) with repeated measures. This format would allow you to accommodate the order of assignment of food treatments to sessions, as well as the temporal correlation among the three measurement times.
Maybe TIME would work well with a regression model, but there are only 3 levels and there's not much you can do other than a linear relationship. Maybe that would be appropriate for these data, maybe not.
For mixed models in SAS, SAS for Mixed Models, 2nd ed is an invaluable resource; an updated version ( SAS® for Mixed Models: An Introduction) is supposed to be released soon. If you run mixed models, you will benefit from reading it. At a more advanced level, Generalized Linear Mixed Models: Modern Concepts, Methods and Applications is also invaluable.