/* ---------------------------------------------------- FILE: logistic.wuschiz2 DATA: WUSCHIZ: Wash U Twins: Schizophrenia PURPOSE: Comparison of logistic regression, ordinary multiple regression, and MANOVA profile analysis ---------------------------------------------------- */ OPTIONS NOCENTER NODATA PAGENO=1; * - NOTE: Assign LIBNAME p7291 tot he directory/folder containing the wuschizo data; *LIBNAME p7291 ''; /* set up formats for the variable schizo */ PROC FORMAT; VALUE szfmt 0 = 'None' 1 = 'Sz Spectrum' 2 = 'Definite Sz'; TITLE Washington University Twins: Schizophrenia; DATA temp; SET p7291.wuschiz; FORMAT schizo szfmt.; RUN; TITLE2 Example of a Logistic Regression with Ordinal Classes ; /* NOTE WELL: Just as in PROC GLM, it is very importatnt to know the order of the classes. Specifying ORDER=internal and then DESCENDING will order the variable schizo from 2 to 1 to 0, so that we will be predicting definite schizophrenia, then probable schizophrenia, then no schizophrenia*/ PROC LOGISTIC DATA=temp ORDER=internal DESCENDING; MODEL schizo = l -- si ; RUN; /* ---------------------------------------- */ TITLE2 Ordinary Multiple Regression; PROC REG DATA=temp; MODEL schizo = l -- si / stb tol vif; RUN; /* ---------------------------------------- */ /* ---------------------------------------- */ TITLE2 MANOVA Profile Analysis; PROC GLM DATA=temp ORDER=internal; CLASS schizo; MODEL l -- si = schizo; CONTRAST 'Def + Spctrm Vs None' schizo 2 -1 -1; CONTRAST 'Definite Vs Spectrum' schizo 0 -1 1; MEANS schizo; MANOVA h=schizo; RUN; TITLE3 Profile Elevation; MANOVA H=schizo M = (1 1 1 1 1 1 1 1 1 1 1 1 1); RUN; TITLE3 Profile Shape; MANOVA H=schizo M = (1 -1 0 0 0 0 0 0 0 0 0 0 0, 0 1 -1 0 0 0 0 0 0 0 0 0 0, 0 0 1 -1 0 0 0 0 0 0 0 0 0, 0 0 0 1 -1 0 0 0 0 0 0 0 0, 0 0 0 0 1 -1 0 0 0 0 0 0 0, 0 0 0 0 0 1 -1 0 0 0 0 0 0, 0 0 0 0 0 0 1 -1 0 0 0 0 0, 0 0 0 0 0 0 0 1 -1 0 0 0 0, 0 0 0 0 0 0 0 0 1 -1 0 0 0, 0 0 0 0 0 0 0 0 0 1 -1 0 0, 0 0 0 0 0 0 0 0 0 0 1 -1 0, 0 0 0 0 0 0 0 0 0 0 0 1 -1) PREFIX = slope / SUMMARY; RUN; /* ---------------------------------------- */