* the following SAS statements will read in a correlation matrix and create a special SAS data set. These correlational data are the clinical scales of the Minnesota Multiphasic Personality Inventory (MMPI) taken from Hathaway and McKinley (1940), A multiphasic personality schedule (minnesota): I, Construction of the schedule. Journal of Psychology, 10, 249-254. The matrix for 225 normal male adults is on MMPIM.DAT and the matrix for 315 normal female adults is on MMPIF.DAT; DATA MMPIF(TYPE=CORR); * the (TYPE=CORR) option after the SAS data set specifies that this is a special SAS data set consisting of a correlation matrix. There are other special types of SAS data sets such as TYPE=COV for a covariance matrix, TYPE=SSCP for a sum of squares and cross products matrix, and TYPE=FACTOR for a series of matrices used in factor analysis;; IF _N_=1 THEN _TYPE_ = 'N '; ELSE _TYPE_='CORR'; INPUT _NAME_ $8. L F K Hs D Hy Pd Pa Pt Sc Ma SI; * the variables _TYPE_ and _NAME_ are special SAS variables required for a TYPE=CORR data set. Both variables are alphanumeric--i.e., the computer does not look at them as numbers. _TYPE_ indicated the type of statistic, in this case a correlation coefficient. _NAME_ gives the name of the variable; LABEL L='Lie' F='F' K='K' Hs='Hypochondriasis' D='Depression' Hy='Hysteria' Pd='Psychopathic deviate' Pa='Paranoia' Pt='Psychasthenia' Sc='Schizophrenia' Ma='Hypomania' SI='Social Introversion'; DATALINES; df 315 315 315 315 315 315 315 315 315 315 315 315 L 1.00 -.24 .40 -.12 -.01 .12 -.17 -.13 -.40 -.37 -.26 -.10 F -.24 1.00 -.34 .49 .34 .22 .52 .49 .59 .76 .43 .27 K .40 -.34 1.00 -.34 -.08 .29 -.26 -.14 -.66 -.58 -.40 -.43 Hs -.12 .49 -.34 1.00 .56 .63 .35 .33 .60 .58 .19 .39 D -.01 .34 -.08 .56 1.00 .49 .35 .27 .56 .39 -.13 .60 Hy .12 .22 .29 .63 .49 1.00 .23 .28 .17 .15 -.04 .04 Pd -.17 .52 -.26 .35 .35 .23 1.00 .45 .53 .62 .47 .22 Pa -.13 .49 -.14 .33 .27 .28 .45 1.00 .44 .52 .28 .23 Pt -.40 .59 -.66 .60 .56 .17 .53 .44 1.00 .83 .35 .63 Sc -.37 .76 -.58 .58 .39 .15 .62 .52 .83 1.00 .56 .46 Ma -.26 .43 -.40 .19 -.13 -.04 .47 .28 .35 .56 1.00 -.13 SI -.10 .27 -.43 .39 .60 .04 .22 .23 .63 .46 -.13 1.00 ; RUN; TITLE 'Hathaway and McKinley MMPI Correlation Matrices'; TITLE2 'Females'; PROC PRINT; PROC FACTOR DATA=MMPIF ROTATE=PROMAX; RUN; * - Now lets do the same for Males; DATA MMPIM(TYPE=CORR); IF _N_=1 THEN _TYPE_ = 'N '; ELSE _TYPE_='CORR'; INPUT _NAME_ $8. L F K Hs D Hy Pd Pa Pt Sc Ma SI; LABEL L='Lie' F='F' K='K' Hs='Hypochondriasis' D='Depression' Hy='Hysteria' Pd='Psychopathic deviate' Pa='Paranoia' Pt='Psychasthenia' Sc='Schizophrenia' Ma='Hypomania' SI='Social Introversion'; DATALINES; df 225 225 225 225 225 225 225 225 225 225 225 225 L 1.00 -.02 .45 -.04 .17 .24 -.12 -.01 -.31 -.20 -.10 -.12 F -.02 1.00 -.31 .38 .31 .08 .51 .56 .55 .79 .51 .24 K .45 -.31 1.00 -.35 -.04 .38 -.22 -.16 -.69 -.60 -.42 -.48 Hs -.04 .38 -.35 1.00 .60 .53 .38 .35 .60 .53 .15 .44 D .17 .31 -.04 .60 1.00 .45 .34 .35 .48 .37 -.10 .47 Hy .24 .08 .38 .53 .45 1.00 .20 .21 -.01 -.01 -.17 -.04 Pd -.12 .51 -.22 .38 .34 .20 1.00 .44 .52 .59 .45 .21 Pa -.01 .56 -.16 .35 .35 .21 .44 1.00 .52 .61 .33 .19 Pt -.31 .55 -.69 .60 .48 -.01 .52 .52 1.00 .84 .38 .63 Sc -.20 .79 -.60 .53 .37 -.01 .59 .61 .84 1.00 .59 .46 Ma -.10 .51 -.42 .15 -.10 -.17 .45 .33 .38 .59 1.00 -.06 SI -.12 .24 -.48 .44 .47 -.04 .21 .19 .63 .46 -.06 1.00 ; RUN; TITLE 'Hathaway and McKinley MMPI Correlation Matrices'; TITLE2 'Males'; PROC PRINT; PROC FACTOR DATA=MMPIF ROTATE=PROMAX; RUN;