options nocenter ps=64 ls=76;  /* unbalanced split plot MJ 28.2 */

data depress;			/* Depression Scores for Drug Effects */
   infile 'depress.dat' firstobs=2;
   input patient trt $ week score;

proc mixed;			/* the appropriate analysis */
   class patient trt week;
   model score = trt week trt*week / solution;
   random patient(trt);
   lsmeans trt | week;

proc glm;			/* caution here when subplots unbalanced */
   class patient trt week;
   model score = trt patient(trt) week trt*week / solution;
   test h=trt e=patient(trt);		/* wrong test! */
   random patient(trt) / test;		/* Satterthwaite approximations */
   lsmeans trt / e=patient(trt) stderr pdiff;	/* SEs & estims are wrong! */
   lsmeans week trt*week / stderr pdiff;	/* SEs are wrong! */
