/********************* senicreg97b.sps **********************/ include 'senicread97.sps'. /* reads & labels data, etc subtitle 'SENIC DATA: SPSS Multiple Regression with Residuals'. Comment First the indicator dummy vars. These definitions could (should) be in senicread97.sps recode region (missing=sysmis) (1=1) (else=0) into r1. recode region (missing=sysmis) (2=1) (else=0) into r2. recode region (missing=sysmis) (3=1) (else=0) into r3. recode medschl (missing=sysmis) (1=1) (2=0) into mschool. /* mschool is an indicator for medical school = yes crosstabs tables = r1 r2 r3 by region / medschl by mschool / cells=count. /* To check recodes regression variables=stay age nbeds census nurses service r1 r2 r3 mschool infrisk /dependent=infrisk /enter /* Enter all IVs in one step /save=resid(resrisk) pred(prerisk). /* Saving residuals as resrisk, predicted Y as prerisk examine variables=resrisk. /* Track down any suspicious residuals sort cases by resrisk. list variables = resrisk infrisk prerisk. plot /plot resrisk with prerisk stay age nbeds census nurses service region medschl xratio culratio.