BookmarkSubscribeRSS Feed
Tetrix
Calcite | Level 5

Dear all,

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!

Martin

5 REPLIES 5
SteveDenham
Jade | Level 19

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.

Steve Denham

Tetrix
Calcite | Level 5

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...

SteveDenham
Jade | Level 19

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.

Steve Denham

Tetrix
Calcite | Level 5

Thanks again.

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:

proc mixed;

  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..)

  subject=plot;

  run;

SteveDenham
Jade | Level 19

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.

Steve Denham

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 2251 views
  • 0 likes
  • 2 in conversation