www.sas.com > Service and Support > Technical Support
 
Technical Support SAS - The power to know(tm)
  TS Home | Intro to Services | News and Info | Contact TS | Site Map | FAQ | Feedback

  

/****************************************************************/
/* SAS SAMPLE LIBRARY */
/* */
/* NAME: MIXEX1 */
/* TITLE: Documentation Example 1 for PROC MIXED */
/* PRODUCT: STAT */
/* SYSTEM: ALL */
/* KEYS: MIXED LINEAR MODELS, */
/* PROCS: MIXED, */
/* DATA: */
/* */
/* REF: */
/* MISC: */
/* */
/****************************************************************/

/* Example 1 */
*---------------Split-Plot Example------------------*
| Data represent a balanced split-plot example and |
| were reported by Stroup (1989). |
*---------------------------------------------------*;
data sp;
input block a b 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
;

proc mixed data=sp;
class a b block ;
model y = a|b;
random block a*block;
estimate 'a1 mean narrow'
intercept 1
a 1
b .5 .5
a*b .5 .5
| block .25 .25 .25 .25
a*block .25 .25 .25 .25;

estimate 'a1 mean intermediate'
intercept 1
a 1
b .5 .5
a*b .5 .5
| block .25 .25 .25 .25;

estimate 'a1 mean broad'
intercept 1
a 1
b .5 .5
a*b .5 .5;
run;

/* equivalent model */
proc mixed data=sp;
class a b block;
model y = a|b;
random intercept a / subject=block;
run;

Copyright (c) 2002 SAS Institute Inc. All Rights Reserved.
Terms of Use & Legal Information | Privacy Statement