03-31-2012 04:07 PM
I am looking for a way to analyze a design with two within-subject variables. Imagine an experiment where treatment A is applied to several plots. Within these plots there are two sub-treatments B and C (full factoorial). Thus, I have two within-subject factors (with interaction) and the between-subject treatment A. Treatment A again is arranged in non-replicated blocks at several locations
I've tried to analyze the design with Proc Mixed by defining B and C as repeated factors but got the error message that only one repeated measure factor is allowed.
Are there any other options/procedures in SAS to run a model with multiple within-subject (repeated) factors) (not Proc GLM, please)??
Thanx a lot for every response!
04-02-2012 08:12 AM
Check out the Kronecker product types in PROC MIXED. It looks like you would need the UN@UN type. Hopefully, there is enough data (and enough computer power) to fit a model of this type.
04-10-2012 04:01 AM
Thanks a lot! However, the analysis always stopps after giving the number of observations etc. and no statistics are presented. In the log there is no error mesage but the note that "An infinite likelihood is assumed in iteration 0 because of a nonpositive definite estimated R matrix for Plot XY". (Plot was defined as subject). No idea if this may be the reason that the analysis stopps...
04-10-2012 10:53 AM
Almost assuredly the problem is in correctly specifying the subject in the repeated statement. Could you post the code you are using for the analysis? That way I think I might be better able to help with the syntax.
04-13-2012 03:07 AM
The design: on several sites there are 9 plots on which treatment A is applied in 3 levels. On every plot we have 4 subplots where treatments B and C are applied (full factorial: C-B-, C+B-, C-B+, C+B+). Every plots has a specific number defined in variable plot. Thus, the data structure in the file is as follows:
plot site treatA treatB treatC Y
1 1 1 1 1
1 1 1 1 2
1 1 1 2 1
2 1 2 1 1
2 1 2 1 2
4 1 1 1 1
and so on...
I used the following code:
class plot site treatA treatB treatC;
model Y = site|treatA|treatB|treatC; (but I also tried simpel versions like "site treatA treatB")
repeated treatB treatC / type=un@un (but I also tried ar(1), what does not make much sense in this case..)
04-13-2012 08:04 AM
I think the problem may be that plots are identically numbered across sites, so that there is still replication at the subject level of plot. Have you tried subject=plot*site?
You might also consider whether to specify site as a random effect, rather than as a fixed effect. That all depends on your inference space assumptions about site, and you would need to consider the interactions with site as probable error terms for testing the treatment effects.
A third consideration would be defining the subplots as 1 through 4, and then extracting tests about the subplot effect using LSMESTIMATE statements.
Hope this triggers some ideas.