I have the following problem: A study was conducted in 2 locations (1, 2) for 2 years (2012, 2013). In each location, we have 4 blocks . Within each block, we have split plot design with repeated measures. Main plot is gypsum treatments, sub plot is different peanut cultivar. Soil samples were taken from each sub plot at planting, mid bloom and harvest. The response is soil Ca content. Objectives: 1. Whether there is difference between locations or years? If not, then I can pool my data through locations and years. 2. Whether there is difference between treatments? 3. Whether there is difference between sampling times? Here is my SAS code, I don't know if it's correct. If I want to test the year effect, I have treat year as a repeated factor. But I've already had repeated measures within each block (timing), can I use two repeated statements at the same time? proc mixed; class year location block treatment cultivar timing; model Ca=year| location| treatment| cultivar| timing/ddfm=kr; random block block(location) treatment*block(location); repeated timing/subject=block(treatment*cultivar) type=csh; repeated year/subject=location(block*treatment*cultivar) type=csh; lsmeans year| location| treatment| cultivar| timing/diff; run; Thanks!
... View more