Week5 – Examples

Here is an example of a split plot design.  With the information you learned in the Week 5 and Week 6 – try to create the coding for both Proc GLM and Proc MIXED to obtain the same answer.

Follow these steps:

  1. Create the model first!  Irrigation is the Main plot and crop is the subplot
  2. Translate the model into SAS – working through which factors are fixed and which are random
  3. Write out the Proc GLM – ensuring that you are using the correct error term for your main plot – hint: you will need to use a test statement.
  4. Write out the code for Proc MIXED
  5. Save the results as a PDF document
  6. Are your results the same?  They should be 🙂

data crops_2012;

   input Block irrig crop Y @@;
   datalines;
1 1 1 56 1 1 2 41
1 2 1 50 1 2 2 36
1 3 1 39 1 3 2 35
2 1 1 30 2 1 2 25
2 2 1 36 2 2 2 28
2 3 1 33 2 3 2 30
3 1 1 32 3 1 2 24
3 2 1 31 3 2 2 27
3 3 1 15 3 3 2 19
4 1 1 30 4 1 2 25
4 2 1 35 4 2 2 30
4 3 1 17 4 3 2 18
;
Run;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s