LOGISTIC REGRESSION - Ferns in two meadows 1 TWO CLASSES with 4 covariates 23:28 Monday, November 14, 2005 SEE PDISCRIM.SAS FOR VIEWS OF DATASET THE DATA AS SAS SEES IT Subj y1 y2 y3 y4 yy type 1 57 66 18 34 1 XX 2 45 95 60 75 1 XX 3 36 91 68 66 1 XX 4 33 97 45 93 1 XX 5 54 75 39 49 1 XX 6 45 83 47 65 1 XX 7 52 84 45 57 1 XX 8 40 74 42 72 1 XX 9 51 96 35 64 1 XX 10 49 89 51 72 1 XX 11 63 82 34 66 1 XX 12 48 100 28 57 1 XX 13 52 99 28 72 1 XX 14 52 84 41 95 1 XX 15 52 61 32 79 0 OO 16 25 64 33 97 0 OO 17 27 59 56 113 0 OO 18 47 64 41 108 0 OO 19 68 89 55 75 0 OO 20 37 79 36 83 0 OO 21 46 55 54 71 0 OO 22 47 48 31 61 0 OO 23 37 50 36 65 0 OO 24 34 67 56 66 0 OO 25 33 82 50 93 0 OO 26 30 67 41 95 0 OO 27 67 111 44 93 0 OO 28 51 62 44 72 0 OO 29 61 72 43 101 0 OO 30 30 49 54 81 0 OO 31 31 80 43 86 0 OO 32 47 73 50 80 0 OO 33 40 65 51 78 0 OO 34 36 88 36 90 0 OO 35 35 73 47 87 0 OO 36 44 56 41 57 0 OO LOGISTIC REGRESSION - Ferns in two meadows 2 TWO CLASSES with 4 covariates 23:28 Monday, November 14, 2005 LOGISTIC REGRESSION FOR Y1-Y4 The LOGISTIC Procedure Model Information Data Set WORK.FERNS Response Variable yy Number of Response Levels 2 Model binary logit Optimization Technique Fisher's scoring Number of Observations Read 36 Number of Observations Used 36 Response Profile Ordered Total Value yy Frequency 1 1 14 2 0 22 Probability modeled is yy=1. Model Convergence Status Convergence criterion (GCONV=1E-8) satisfied. Model Fit Statistics Intercept Intercept and Criterion Only Covariates AIC 50.114 28.806 SC 51.697 36.724 -2 Log L 48.114 18.806 Testing Global Null Hypothesis: BETA=0 Test Chi-Square DF Pr > ChiSq Likelihood Ratio 29.3076 4 <.0001 Score 19.7594 4 0.0006 Wald 7.7146 4 0.1026 LOGISTIC REGRESSION - Ferns in two meadows 3 TWO CLASSES with 4 covariates 23:28 Monday, November 14, 2005 LOGISTIC REGRESSION FOR Y1-Y4 The LOGISTIC Procedure Analysis of Maximum Likelihood Estimates Standard Wald Parameter DF Estimate Error Chi-Square Pr > ChiSq Intercept 1 5.1945 6.3734 0.6643 0.4151 y1 1 -0.0843 0.0639 1.7405 0.1871 y2 1 0.1996 0.0748 7.1204 0.0076 y3 1 -0.0680 0.0792 0.7365 0.3908 y4 1 -0.1944 0.0835 5.4256 0.0198 Odds Ratio Estimates Point 95% Wald Effect Estimate Confidence Limits y1 0.919 0.811 1.042 y2 1.221 1.054 1.414 y3 0.934 0.800 1.091 y4 0.823 0.699 0.970 Association of Predicted Probabilities and Observed Responses Percent Concordant 95.1 Somers' D 0.906 Percent Discordant 4.5 Gamma 0.909 Percent Tied 0.3 Tau-a 0.443 Pairs 308 c 0.953 LOGISTIC REGRESSION - Ferns in two meadows 4 TWO CLASSES with 4 covariates 23:28 Monday, November 14, 2005 LOGISTIC REGRESSION FOR Y1-Y4 OUTEST DATA (PARTIAL VARIABLE LIST) _NAME_ _TYPE_ Intercept y1 y2 y3 y4 yy PARMS 5.19448 -0.084329 0.19958 -0.067960 -0.19440 LOGISTIC REGRESSION - Ferns in two meadows 5 TWO CLASSES with 4 covariates 23:28 Monday, November 14, 2005 NOW ENTERING PROC IML Fern Data and classification FF TYPE YY 1 57 66 18 34 XX 1 1 45 95 60 75 XX 1 1 36 91 68 66 XX 1 1 33 97 45 93 XX 1 1 54 75 39 49 XX 1 1 45 83 47 65 XX 1 1 52 84 45 57 XX 1 1 40 74 42 72 XX 1 1 51 96 35 64 XX 1 1 49 89 51 72 XX 1 1 63 82 34 66 XX 1 1 48 100 28 57 XX 1 1 52 99 28 72 XX 1 1 52 84 41 95 XX 1 1 52 61 32 79 OO 0 1 25 64 33 97 OO 0 1 27 59 56 113 OO 0 1 47 64 41 108 OO 0 1 68 89 55 75 OO 0 1 37 79 36 83 OO 0 1 46 55 54 71 OO 0 1 47 48 31 61 OO 0 1 37 50 36 65 OO 0 1 34 67 56 66 OO 0 1 33 82 50 93 OO 0 1 30 67 41 95 OO 0 1 67 111 44 93 OO 0 1 51 62 44 72 OO 0 1 61 72 43 101 OO 0 1 30 49 54 81 OO 0 1 31 80 43 86 OO 0 1 47 73 50 80 OO 0 1 40 65 51 78 OO 0 1 36 88 36 90 OO 0 1 35 73 47 87 OO 0 1 44 56 41 57 OO 0 Beta (coefficients) are BETA 5.1944809 -0.084329 0.1995791 -0.06796 -0.194396 Doing a Resubstitution Analysis: Resubstitution analysis for coefficients: TYPE is the original type - CTYPE is the inferred type PREX1 is Logistic Prob(TYPE=XX) LOGISTIC REGRESSION - Ferns in two meadows 6 TWO CLASSES with 4 covariates 23:28 Monday, November 14, 2005 NOW ENTERING PROC IML SUBJ YDOT TYPE PREX1 CTYPE ERRNAME 1 5.7272 XX 0.9968 XX 0 2 1.7024 XX 0.8458 XX 0 3 2.8689 XX 0.9463 XX 0 4 0.6338 XX 0.6533 XX 0 5 3.4333 XX 0.9687 XX 0 6 2.1349 XX 0.8942 XX 0 7 3.4353 XX 0.9688 XX 0 8 -0.2607 XX 0.4352 OO 800 9 5.2334 XX 0.9947 XX 0 10 1.3624 XX 0.7962 XX 0 11 1.1065 XX 0.7515 XX 0 12 8.1212 XX 0.9997 XX 0 13 4.6683 XX 0.9907 XX 0 14 -3.6800 XX 0.0246 OO 1400 15 -4.5483 OO 0.0105 OO 0 16 -5.2398 OO 0.0053 OO 0 17 -11.0797 OO 0.0000 OO 0 18 -9.7770 OO 0.0001 OO 0 19 -1.0948 OO 0.2507 OO 0 20 -0.7404 OO 0.3229 OO 0 21 -5.1798 OO 0.0056 OO 0 22 -3.1541 OO 0.0409 OO 0 23 -3.0290 OO 0.0461 OO 0 24 -0.9368 OO 0.2815 OO 0 25 -2.6997 OO 0.0630 OO 0 26 -5.2176 OO 0.0054 OO 0 27 0.6287 OO 0.6522 XX 2700 28 -3.7191 OO 0.0237 OO 0 29 -8.1362 OO 0.0003 OO 0 30 -6.9719 OO 0.0009 OO 0 31 -1.0937 OO 0.2509 OO 0 32 -3.1494 OO 0.0411 OO 0 33 -3.8349 OO 0.0211 OO 0 34 -0.2206 OO 0.4451 OO 0 35 -3.2943 OO 0.0358 OO 0 36 -1.2065 OO 0.2303 OO 0 ERRSUM Number of misclassifications: 3 Classification of test data: MSUBJ MDAT MDOT MPREX1 MTYPE 1 34 99 15 50 11.3464 1.0000 XX 2 45 70 49 86 -4.6779 0.0092 OO 3 50 82 51 104 -6.3396 0.0018 OO 4 46 119 43 79 6.7857 0.9989 XX