* This is file KIDNEY.SPS
TITLE 'Two way ANOVA with missing data'
DATA LIST FILE=kidnymis.dat LIST
/ A Hyper N1 N2 Nephron
VAR LABELS A='Na-K-ATPase activity'
Hyper='normal or hypertensive rats'
Nephron='nephron site'
* MANOVA requires consecutive integer values for group codes, so we
* need to recode the Hyper factor
RECODE Hyper(-1=0)
MANOVA A by Hyper (0,1) Nephron (1,3)
/Design=Hyper Nephron Hyper by Nephron
* The default sums of squares are SSTYPE(UNIQUE) which are the
* marginal sums of squares need for missing data (what SAS GLM calls
* the 'TYPE III' sums of squares).
*
* Now, do a missing cell problem (no interaction)
DATA LIST FILE=kidmiscl.dat LIST
/ A Hyper N1 N2 Nephron
VAR LABELS A='Na-K-ATPase activity'
Hyper='normal or hypertensive rats'
Nephron='nephron site'
RECODE Hyper (-1=0)
MANOVA A by Hyper (0,1) Nephron (1,3)
/Error=W+R
/Design=Hyper Nephron
* The ERROR=W+R statement pools the residual and within cell errors to obtain
* the error term necessary to conduct tests based on the marginal sums of
* squares. This command only needs to be entered if there are is one or more
* empty cells and interactions left out of the model. If there are no empty
* cells and all interactions are in the model, including the ERROR=W+R *
command will not affect the residual sum of squares.
FINISH