Resources

Example 2 for PROC GAMPL

/****************************************************************/
/*          S A S   S A M P L E   L I B R A R Y                 */
/*                                                              */
/*    NAME: hpgamex2                                            */
/*   TITLE: Example 2 for PROC GAMPL                            */
/*    DESC: Pima Indians Diabetes data set                      */
/*     REF: Lim, Loh and Shih (2000)                            */
/* PRODUCT: STAT                                                */
/*  SYSTEM: ALL                                                 */
/*    KEYS:                                                     */
/*   PROCS: GAMPL                                               */
/*                                                              */
/* SUPPORT: Weijie Cai                                          */
/****************************************************************/

title 'Diabetes Study';
data DiabetesStudy;
   input NPreg Glucose Pressure Triceps BMI Pedigree Age Diabetes Test@@;
   datalines;
 6  148  72  35  33.6  0.627  50  1  1    1   85  66  29  26.6  0.351  31  0  1
 1   89  66  23  28.1  0.167  21  0  0    3   78  50  32    31  0.248  26  1  0
 2  197  70  45  30.5  0.158  53  1  0    5  166  72  19  25.8  0.587  51  1  1
 0  118  84  47  45.8  0.551  31  1  1    1  103  30  38  43.3  0.183  33  0  1
 3  126  88  41  39.3  0.704  27  0  0    9  119  80  35    29  0.263  29  1  0
 1   97  66  15  23.2  0.487  22  0  0    5  109  75  26    36  0.546  60  0  1
 3   88  58  11  24.8  0.267  22  0  1   10  122  78  31  27.6  0.512  45  0  0
 4  103  60  33    24  0.966  33  0  0    9  102  76  37  32.9  0.665  46  1  1
 2   90  68  42  38.2  0.503  27  1  0    4  111  72  47  37.1   1.39  56  1  0
 3  180  64  25    34  0.271  26  0  1    7  106  92  18  22.7  0.235  48  0  0
 9  171 110  24  45.4  0.721  54  1  0    0  180  66  39    42  1.893  25  1  1
 2   71  70  27    28  0.586  22  0  0    1  103  80  11  19.4  0.491  22  0  0
 1  101  50  15  24.2  0.526  26  0  0    5   88  66  21  24.4  0.342  30  0  0
 7  150  66  42  34.7  0.718  42  0  1    1   73  50  10    23  0.248  21  0  0
 0  105  64  41  41.5  0.173  22  0  0    5   99  74  27    29  0.203  32  0  0
 0  109  88  30  32.5  0.855  38  1  0    1   95  66  13  19.6  0.334  25  0  0
 4  146  85  27  28.9  0.189  27  0  0    2  100  66  20  32.9  0.867  28  1  0
 4  129  86  20  35.1  0.231  23  0  0    5   95  72  33  37.7   0.37  27  0  1
 2  112  66  22    25  0.307  24  0  0    3  113  44  13  22.4   0.14  22  0  0
 7   83  78  26  29.3  0.767  36  0  0    0  101  65  28  24.6  0.237  22  0  0
13  106  72  54  36.6  0.178  45  0  0    2  100  68  25  38.5  0.324  26  0  1
15  136  70  32  37.1  0.153  43  1  1    4  123  80  15    32  0.443  34  0  0
 7   81  78  40  46.7  0.261  42  0  0    2   92  62  28  31.6   0.13  24  0  0
 6   93  50  30  28.7  0.356  23  0  0    1  122  90  51  49.7  0.325  31  1  0
 1   81  72  18  26.6  0.283  24  0  0    1  126  56  29  28.7  0.801  21  0  1
 4  144  58  28  29.5  0.287  37  0  0    1   89  76  34  31.2  0.192  23  0  1
 7  160  54  32  30.5  0.588  39  1  1    4   97  60  23  28.2  0.443  22  0  0
 0  162  76  56  53.2  0.759  25  1  0    2  107  74  30  33.6  0.404  23  0  1
 1   88  30  42    55  0.496  26  1  0    1  117  88  24  34.5  0.403  40  1  1
 4  173  70  14  29.7  0.361  33  1  1    3  170  64  37  34.5  0.356  30  1  0
 8   84  74  31  38.3  0.457  39  0  1    0  100  70  26  30.8  0.597  21  0  0
 0   93  60  25  28.7  0.532  22  0  0    5  106  82  30  39.5  0.286  38  0  0
 2  108  52  26  32.5  0.318  22  0  0    2  106  64  35  30.5    1.4  34  0  0
 2   90  70  17  27.3  0.085  22  0  0    9  156  86  28  34.3  1.189  42  1  0
 1  153  82  42  40.6  0.687  23  0  1    7  152  88  44    50  0.337  36  1  0
 2   88  74  19    29  0.229  22  0  0   17  163  72  41  40.9  0.817  47  1  0
 4  151  90  38  29.7  0.294  36  0  1    7  102  74  40  37.2  0.204  45  0  1
 0  114  80  34  44.2  0.167  27  0  0    6  104  74  18  29.9  0.722  41  1  0
 2   75  64  24  29.7   0.37  33  0  1    8  179  72  42  32.7  0.719  36  1  0
 0  129 110  46  67.1  0.319  26  1  0    1  128  98  41    32  1.321  33  1  0
 8  109  76  39  27.9   0.64  31  1  1    4  109  64  44  34.8  0.905  26  1  0
 0  113  80  16    31  0.874  21  0  0    0  108  68  20  27.3  0.787  32  0  1
 5  111  72  28  23.9  0.407  27  0  0    8  196  76  29  37.5  0.605  57  1  1
 2   81  60  22  27.7   0.29  25  0  0    0  147  85  54  42.8  0.375  24  0  0
 5  109  62  41  35.8  0.514  25  1  0    6  125  68  30    30  0.464  32  0  1
 5   85  74  22    29  1.224  32  1  1    7  142  60  33  28.8  0.687  61  0  0
 1  100  66  15  23.6  0.666  26  0  0    1   87  78  27  34.6  0.101  22  0  1
 3  162  52  38  37.2  0.652  24  1  0    4  197  70  39  36.7  2.329  31  0  1
 0  117  80  31  45.2  0.089  24  0  1    6  134  80  37  46.2  0.238  46  1  0
 3   74  68  28  29.7  0.293  23  0  0    7  181  84  21  35.9  0.586  51  1  1
 0  179  90  27  44.1  0.686  23  1  0    1   91  64  24  29.2  0.192  21  0  0
 4   91  70  32  33.1  0.446  22  0  1    6  119  50  22  27.1  1.318  33  1  0
 2  146  76  35  38.2  0.329  29  0  1    9  184  85  15    30  1.213  49  1  0
 0  165  90  33  52.3  0.427  23  0  0    9  124  70  33  35.4  0.282  34  0  1
 1  111  86  19  30.1  0.143  23  0  1    2   90  80  14  24.4  0.249  24  0  0
 1  113  64  35  33.6  0.543  21  1  1    3  111  56  39  30.1  0.557  30  0  0
11  155  76  28  33.3  1.353  51  1  0    4   95  70  32  32.1  0.612  24  0  1
 5   96  74  18  33.6  0.997  43  0  0    2  128  64  42    40  1.101  24  0  1
10  101  86  37  45.6  1.136  38  1  0    2  108  62  32  25.2  0.128  21  0  1
 2  100  70  52  40.5  0.677  25  0  0    7  106  60  24  26.5  0.296  29  1  0
 0  104  64  23  27.8  0.454  23  0  0    2  108  62  10  25.3  0.881  22  0  1
 7  133  88  15  32.4  0.262  37  0  0    7  136  74  26    26  0.647  51  0  1
 1  119  86  39  45.6  0.808  29  1  0    4   96  56  17  20.8   0.34  26  0  0
 0   78  88  29  36.9  0.434  21  0  0    0  107  62  30  36.6  0.757  25  1  0
 6  151  62  31  35.5  0.692  28  0  0    2  146  70  38    28  0.337  29  1  0
 0  126  84  29  30.7   0.52  24  0  0    2  144  58  33  31.6  0.422  25  1  1
 2  120  76  37  39.7  0.215  29  0  0   10  161  68  23  25.5  0.326  47  1  0
 0  128  68  19  30.5  1.391  25  1  0    2  124  68  28  32.9  0.875  30  1  1
 2  155  74  17  26.6  0.433  27  1  1    3  113  50  10  29.5  0.626  25  0  1
 7  109  80  31  35.9  1.127  43  1  0    3  115  66  39  38.1   0.15  28  0  1
13  152  90  33  26.8  0.731  43  1  0    2  112  75  32  35.7  0.148  21  0  1
 1  157  72  21  25.6  0.123  24  0  0    1  122  64  32  35.1  0.692  30  1  1
 2  102  86  36  45.5  0.127  23  1  1    6  105  70  32  30.8  0.122  37  0  1
 8  118  72  19  23.1  1.476  46  0  0    2   87  58  16  32.7  0.166  25  0  0
 1   95  60  18  23.9   0.26  22  0  0    1  130  70  13  25.9  0.472  22  0  0
 1   95  74  21  25.9  0.673  36  0  0    8  126  88  36  38.5  0.349  49  0  1
 1  139  46  19  28.7  0.654  22  0  1    3   99  62  19  21.8  0.279  26  0  0
 1  125  50  40  33.3  0.962  28  1  0    1  196  76  36  36.5  0.875  29  1  0
 5  189  64  33  31.2  0.583  29  1  0    5  103 108  37  39.2  0.305  65  0  0
 4  147  74  25  34.9  0.385  30  0  1    5   99  54  28    34  0.499  30  0  0
 3   81  86  16  27.5  0.306  22  0  1    3  173  82  48  38.4  2.137  25  1  0
 0   84  64  22  35.8  0.545  21  0  1    0   98  82  15  25.2  0.299  22  0  0
 1   87  60  37  37.2  0.509  22  0  0    0   93 100  39  43.4  1.021  35  0  1
 0  105  68  22    20  0.236  22  0  0    1   90  62  18  25.1  1.268  25  0  1
 1  125  70  24  24.3  0.221  25  0  1    1  119  54  13  22.3  0.205  24  0  0
 5  116  74  29  32.3   0.66  35  1  1    8  105 100  36  43.3  0.239  45  1  1
 3  100  68  23  31.6  0.949  28  0  1    1  131  64  14  23.7  0.389  21  0  0
 2  127  58  24  27.7    1.6  25  0  0    3   96  56  34  24.7  0.944  39  0  1
 3  193  70  31  34.9  0.241  25  1  0    5  136  84  41    35  0.286  35  1  0
 9   72  78  25  31.6   0.28  38  0  0    1  172  68  49  42.4  0.702  28  1  0
 6  102  90  39  35.7  0.674  28  0  1    1  112  72  30  34.4  0.528  25  0  0
 1  143  84  23  42.4  1.076  22  0  0    3  173  84  33  35.7  0.258  22  1  1
 4  144  82  32  38.5  0.554  37  1  1    3  129  64  29  26.4  0.219  28  1  0
 1  119  88  41  45.3  0.507  26  0  1    2   94  68  18    26  0.561  21  0  0
 0  102  64  46  40.6  0.496  21  0  1    8  151  78  32  42.9  0.516  36  1  0
 1  181  64  30  34.1  0.328  38  1  0    1   95  82  25    35  0.233  43  1  0
 3   89  74  16  30.4  0.551  38  0  0    1   80  74  11    30  0.527  22  0  1
 1   90  68   8  24.5  1.138  36  0  0    0  189 104  25  34.3  0.435  41  1  0
 4  117  64  27  33.2   0.23  24  0  0    0  180  78  63  59.4   2.42  25  1  1
 0  104  64  37  33.6   0.51  22  1  1    0  120  74  18  30.5  0.285  26  0  0
 1   82  64  13  21.2  0.415  23  0  1    0   91  68  32  39.9  0.381  25  0  0
 9  134  74  33  25.9   0.46  81  0  1    9  120  72  22  20.8  0.733  48  0  0
 8   74  70  40  35.3  0.705  39  0  0    5   88  78  30  27.6  0.258  37  0  0
 0  124  56  13  21.8  0.452  21  0  0    0   97  64  36  36.8    0.6  25  0  0
 1  144  82  40  41.3  0.607  28  0  0    0  137  70  38  33.2   0.17  22  0  0
 4  132  86  31    28  0.419  63  0  1    3  158  70  30  35.5  0.344  35  1  0
 0  123  88  37  35.2  0.197  29  0  0    0   84  82  31  38.2  0.233  23  0  1
 0  135  68  42  42.3  0.365  24  1  0    1  139  62  41  40.7  0.536  21  0  1
 0  173  78  32  46.5  1.159  58  0  0    2   83  65  28  36.8  0.629  24  0  1
 2   89  90  30  33.5  0.292  42  0  1    4   99  68  38  32.8  0.145  33  0  1
 4  125  70  18  28.9  1.144  45  1  0    2   81  72  15  30.1  0.547  25  0  1
 6  154  74  32  29.3  0.839  39  0  0    2  117  90  19  25.2  0.313  21  0  0
 3   84  72  32  37.2  0.267  28  0  1    7   94  64  25  33.3  0.738  41  0  0
 3   96  78  39  37.3  0.238  40  0  0   12   84  72  31  29.7  0.297  46  1  0
 3   99  54  19  25.6  0.154  24  0  1    3  163  70  18  31.6  0.268  28  1  0
 9  145  88  34  30.3  0.771  53  1  0    6  129  90   7  19.6  0.582  60  0  0
 2   68  70  32    25  0.187  25  0  1    3   87  60  18  21.8  0.444  21  0  1
 2  122  60  18  29.8  0.717  22  0  1    1   77  56  30  33.3  1.251  24  0  1
 0  127  80  37  36.3  0.804  23  0  1    3  128  72  25  32.4  0.549  27  1  0
10   90  85  32  34.9  0.825  56  1  0    4   84  90  23  39.5  0.159  25  0  0
 1   88  78  29    32  0.365  29  0  0    8  186  90  35  34.5  0.423  37  1  0
 5  187  76  27  43.6  1.034  53  1  0    4  131  68  21  33.1   0.16  28  0  0
 1  116  70  28  27.4  0.204  21  0  0    3   84  68  30  31.9  0.591  25  0  1
 1   88  62  24  29.9  0.422  23  0  1    1   84  64  23  36.9  0.471  28  0  0
11  103  68  40  46.2  0.126  42  0  0    6   99  60  19  26.9  0.497  32  0  1
 1   99  72  30  38.6  0.412  21  0  0    3  111  58  31  29.5   0.43  22  0  1
 2   98  60  17  34.7  0.198  22  0  0    1  143  86  30  30.1  0.892  23  0  1
 1  119  44  47  35.5   0.28  25  0  0    6  108  44  20    24  0.813  35  0  1
 3  176  86  27  33.3  1.154  52  1  0   11  111  84  40  46.8  0.925  45  1  1
 2  112  78  50  39.4  0.175  24  0  1    2   82  52  22  28.5  1.699  25  0  1
 6  123  72  45  33.6  0.733  34  0  0    1   89  24  19  27.8  0.559  21  0  0
 1  108  88  19  27.1    0.4  24  0  0    1  124  60  32  35.8  0.514  21  0  1
 1  181  78  42    40  1.258  22  1  0    1   92  62  25  19.5  0.482  25  0  0
 0  152  82  39  41.5   0.27  27  0  0    3  174  58  22  32.9  0.593  36  1  1
 6  105  80  28  32.5  0.878  26  0  1   11  138  74  26  36.1  0.557  50  1  0
 2   68  62  13  20.1  0.257  23  0  1    9  112  82  24  28.2  1.282  50  1  0
 0   94  70  27  43.5  0.347  21  0  0    4   90  88  47  37.7  0.362  29  0  0
 4   94  65  22  24.7  0.148  21  0  1    0  102  78  40  34.5  0.238  24  0  0
 1  128  82  17  27.5  0.115  22  0  1    7   97  76  32  40.9  0.871  32  1  1
 1  100  74  12  19.5  0.149  28  0  0    3  103  72  30  27.6   0.73  27  0  0
 0  179  50  36  37.8  0.455  22  1  0   11  136  84  35  28.3   0.26  42  1  1
 1  117  60  23  33.8  0.466  27  0  0    2  155  52  27  38.7   0.24  25  1  0
 2  101  58  35  21.8  0.155  22  0  1    1  112  80  45  34.8  0.217  24  0  1
 4  145  82  18  32.5  0.235  70  1  1   10  111  70  27  27.5  0.141  40  1  0
 6   98  58  33    34   0.43  43  0  0    6  165  68  26  33.6  0.631  49  0  0
10   68 106  23  35.5  0.285  47  0  1    3  123 100  35  57.3   0.88  22  0  1
 0  162  76  36  49.6  0.364  26  1  1    0   95  64  39  44.6  0.366  22  0  0
 2  129  74  26  33.2  0.591  25  0  0    1  107  50  19  28.3  0.181  29  0  0
 7  142  90  24  30.4  0.128  43  1  1    3  169  74  19  29.9  0.268  31  1  0
 6   80  80  36  39.8  0.177  28  0  1    2  127  46  21  34.4  0.176  22  0  0
 2   93  64  32    38  0.674  23  1  0    5  126  78  27  29.6  0.439  40  0  0
10  129  62  36  41.2  0.441  38  1  0    0  134  58  20  26.4  0.352  21  0  0
 7  187  50  33  33.9  0.826  34  1  1    3  173  78  39  33.8   0.97  31  1  0
10   94  72  18  23.1  0.595  56  0  0    1  108  60  46  35.5  0.415  24  0  0
 5  117  86  30  39.1  0.251  42  0  1    1  116  78  29  36.1  0.496  25  0  1
 0  141  84  26  32.4  0.433  22  0  0    2  174  88  37  44.5  0.646  24  1  0
 2  106  56  27    29  0.426  22  0  1    0  126  86  27  27.4  0.515  21  0  1
 8   65  72  23    32    0.6  42  0  1    2   99  60  17  36.6  0.453  21  0  1
11  120  80  37  42.3  0.785  48  1  1    3  102  44  20  30.8    0.4  26  0  1
 1  109  58  18  28.5  0.219  22  0  0   13  153  88  37  40.6  1.174  39  0  0
12  100  84  33    30  0.488  46  0  0    1  147  94  41  49.3  0.358  27  1  0
 3  187  70  22  36.4  0.408  36  1  0    1  121  78  39    39  0.261  28  0  0
 3  108  62  24    26  0.223  25  0  0    0  181  88  44  43.3  0.222  26  1  1
 1  128  88  39  36.5  1.057  37  1  0    2   88  58  26  28.4  0.766  22  0  1
 9  170  74  31    44  0.403  43  1  1   10  101  76  48  32.9  0.171  63  0  1
 5  121  72  23  26.2  0.245  30  0  0    1   93  70  31  30.4  0.315  23  0  1
 5   86  68  28  30.2  0.364  24  0  1    7  195  70  33  25.1  0.163  55  1  0
 5   77  82  41  35.8  0.156  35  0  1    0  165  76  43  47.9  0.259  26  0  1
 0  107  60  25  26.4  0.133  23  0  1    5   97  76  27  35.6  0.378  52  1  0
 3   83  58  31  34.3  0.336  25  0  1    1  193  50  16  25.9  0.655  24  0  1
 3  142  80  15  32.4    0.2  63  0  1    2  128  78  37  43.3  1.224  31  1  0
 0  137  40  35  43.1  2.288  33  1  0    9  154  78  30  30.9  0.164  45  0  0
 1  189  60  23  30.1  0.398  59  1  0   12   92  62   7  27.6  0.926  44  1  1
 1   86  66  52  41.3  0.917  29  0  0    4   99  76  15  23.2  0.223  21  0  0
 1  109  60   8  25.4  0.947  21  0  1   11  143  94  33  36.6  0.254  51  1  0
 1  149  68  29  29.3  0.349  42  1  0    0  139  62  17  22.1  0.207  21  0  0
 2   99  70  16  20.4  0.235  27  0  0    1  100  66  29    32  0.444  42  0  1
 4   83  86  19  29.3  0.317  34  0  1    0  101  64  17    21  0.252  21  0  0
 1   87  68  34  37.6  0.401  24  0  0    9  164  84  21  30.8  0.831  32  1  0
 1   99  58  10  25.4  0.551  21  0  0    0  140  65  26  42.6  0.431  24  1  0
 5  108  72  43  36.1  0.263  33  0  1    2  110  74  29  32.4  0.698  27  0  1
 1   79  60  42  43.5  0.678  23  0  0    3  148  66  25  32.5  0.256  22  0  1
 0  121  66  30  34.3  0.203  33  1  0    3  158  64  13  31.2  0.295  24  0  0
 2  105  80  45  33.7  0.711  29  1  0   13  145  82  19  22.2  0.245  57  0  0
 1   79  80  25  25.4  0.583  22  0  0    1   71  48  18  20.4  0.323  22  0  1
 0  102  86  17  29.3  0.695  27  0  1    0  119  66  27  38.8  0.259  22  0  1
 8  176  90  34  33.7  0.467  58  1  0    1   97  68  21  27.2  1.095  22  0  1
 4  129  60  12  27.5  0.527  31  0  0    1   97  64  19  18.2  0.299  21  0  0
 0   86  68  32  35.8  0.238  25  0  0    2  125  60  20  33.8  0.088  31  0  1
 5  123  74  40  34.1  0.269  28  0  0    2   92  76  20  24.2  1.698  28  0  0
 3  171  72  33  33.3  0.199  24  1  0    1  199  76  43  42.9  1.394  22  1  1
 3  116  74  15  26.3  0.107  24  0  0    2   83  66  23  32.2  0.497  22  0  0
 8  154  78  32  32.4  0.443  45  1  0    1  114  66  36  38.1  0.289  21  0  1
 1  106  70  28  34.2  0.142  22  0  1    4  127  88  11  34.5  0.598  28  0  0
 1  124  74  36  27.8    0.1  30  0  0    1  109  38  18  23.1  0.407  26  0  0
 2  123  48  32  42.1   0.52  26  0  0    8  167 106  46  37.6  0.165  43  1  1
 7  184  84  33  35.5  0.355  41  1  0    1   96  64  27  33.2  0.289  21  0  1
10  129  76  28  35.9   0.28  39  0  0    6   92  62  32    32  0.085  46  0  0
 6  109  60  27    25  0.206  27  0  0    5  139  80  35  31.6  0.361  25  1  0
 6  134  70  23  35.4  0.542  29  1  0    3  106  54  21  30.9  0.292  24  0  1
 0  131  66  40  34.3  0.196  22  1  0    0  135  94  46  40.6  0.284  26  0  1
 5  158  84  41  39.4  0.395  29  1  0    3  112  74  30  31.6  0.197  25  1  1
 8  181  68  36  30.1  0.615  60  1  0    2  121  70  32  39.1  0.886  23  0  0
 1  168  88  29    35  0.905  52  1  1    1  144  82  46  46.1  0.335  46  1  0
 2  101  58  17  24.2  0.614  23  0  1    2   96  68  13  21.1  0.647  26  0  0
 3  107  62  13  22.9  0.678  23  1  0   12  121  78  17  26.5  0.259  62  0  0
 2  100  64  23  29.7  0.368  21  0  1    4  154  72  29  31.3  0.338  37  0  1
 6  125  78  31  27.6  0.565  49  1  0   10  125  70  26  31.1  0.205  41  1  1
 2  122  76  27  35.9  0.483  26  0  1    2  114  68  22  28.7  0.092  25  0  0
 1  115  70  30  34.6  0.529  32  1  0    7  114  76  17  23.8  0.466  31  0  0
 2  115  64  22  30.8  0.421  21  0  1    1  130  60  23  28.6  0.692  21  0  0
 1   79  75  30    32  0.396  22  0  0    4  112  78  40  39.4  0.236  38  0  0
 7  150  78  29  35.2  0.692  54  1  1    1   91  54  25  25.2  0.234  23  0  1
 1  100  72  12  25.3  0.658  28  0  0   12  140  82  43  39.2  0.528  58  1  1
 4  110  76  20  28.4  0.118  27  0  1    2   94  76  18  31.6  0.649  23  0  0
 2   84  50  23  30.4  0.968  21  0  0   10  148  84  48  37.6  1.001  51  1  0
 3   61  82  28  34.4  0.243  46  0  1    4  117  62  12  29.7   0.38  30  1  0
 3   99  80  11  19.3  0.284  30  0  1    3   80  82  31  34.2  1.292  27  1  1
 4  154  62  31  32.8  0.237  23  0  0    6  103  72  32  37.7  0.324  55  0  0
 6  111  64  39  34.2   0.26  24  0  1    0  124  70  20  27.4  0.254  36  1  0
 1  143  74  22  26.2  0.256  21  0  0    1   81  74  41  46.3  1.096  32  0  1
 4  189 110  31  28.5   0.68  37  0  0    4  116  72  12  22.1  0.463  37  0  0
 7  103  66  32  39.1  0.344  31  1  1    8  124  76  24  28.7  0.687  52  1  1
 1   71  78  50  33.2  0.422  21  0  1    0  137  84  27  27.3  0.231  59  0  0
 9  112  82  32  34.2   0.26  36  1  0    4  148  60  27  30.9   0.15  29  1  0
 1  136  74  50  37.4  0.399  24  0  0    9  145  80  46  37.9  0.637  40  1  0
 1   93  56  11  22.5  0.417  22  0  0    1  107  72  30  30.8  0.821  24  0  0
12  151  70  40  41.8  0.742  38  1  1    1   97  70  40  38.1  0.218  30  0  0
 5  144  82  26    32  0.452  58  1  0    2  112  86  42  38.4  0.246  28  0  0
 2   99  52  15  24.6  0.637  21  0  1    1  109  56  21  25.2  0.833  23  0  1
 1  120  80  48  38.9  1.162  41  0  1    7  187  68  39  37.7  0.254  41  1  0
 3  129  92  49  36.4  0.968  32  1  1    7  179  95  31  34.2  0.164  60  0  0
 6   80  66  30  26.2  0.313  41  0  0    2  105  58  40  34.9  0.225  25  0  0
 3  191  68  15  30.9  0.299  34  0  0    0   95  80  45  36.5   0.33  26  0  0
 4   99  72  17  25.6  0.294  28  0  1    0  137  68  14  24.8  0.143  21  0  0
 1   97  70  15  18.2  0.147  21  0  0    0  100  88  60  46.8  0.962  31  0  0
 1  167  74  17  23.4  0.447  33  1  0    0  180  90  26  36.5  0.314  35  1  1
 2  122  70  27  36.8   0.34  27  0  1    1   90  62  12  27.2   0.58  24  0  0
 3  120  70  30  42.9  0.452  30  0  0    6  154  78  41  46.1  0.571  27  0  0
 2   56  56  28  24.2  0.332  22  0  0    0  177  60  29  34.6  1.072  21  1  0
 3  124  80  33  33.2  0.305  26  0  1    8   85  55  20  24.4  0.136  42  0  0
12   88  74  40  35.3  0.378  48  0  1    9  152  78  34  34.2  0.893  33  1  0
 0  198  66  32  41.3  0.502  28  1  1    0  188  82  14    32  0.682  22  1  0
 5  139  64  35  28.6  0.411  26  0  0    7  168  88  42  38.2  0.787  40  1  0
 2  197  70  99  34.7  0.575  62  1  0    2  142  82  18  24.7  0.761  21  0  1
 8  126  74  38  25.9  0.162  39  0  1    3  158  76  36  31.6  0.851  28  1  1
 3  130  78  23  28.4  0.323  34  1  0    2  100  54  28  37.8  0.498  24  0  0
 1  164  82  43  32.8  0.341  50  0  1    4   95  60  32  35.4  0.284  28  0  0
 2  122  52  43  36.2  0.816  28  0  0    4   85  58  22  27.8  0.306  28  0  0
 0  151  90  46  42.1  0.371  21  1  0    6  144  72  27  33.9  0.255  40  0  1
 3  111  90  12  28.4  0.495  29  0  1    1  107  68  19  26.5  0.165  24  0  0
 6  115  60  39  33.7  0.245  40  1  0    5  105  72  29  36.9  0.159  28  0  0
 7  194  68  28  35.9  0.745  41  1  0    4  184  78  39    37  0.264  31  1  1
 0   95  85  25  37.4  0.247  24  1  0    7  124  70  33  25.5  0.161  37  0  0
 1  111  62  13    24  0.138  23  0  1    7  137  90  41    32  0.391  39  0  0
 9   57  80  37  32.8  0.096  41  0  1    2  157  74  35  39.4  0.134  30  0  0
 2   95  54  14  26.1  0.748  22  0  0   12  140  85  33  37.4  0.244  41  0  1
 0  117  66  31  30.8  0.493  22  0  0    8  100  74  40  39.4  0.661  43  1  0
 9  123  70  44  33.1  0.374  40  0  1    0  138  60  35  34.6  0.534  21  1  0
14  100  78  25  36.6  0.412  46  1  0   14  175  62  30  33.6  0.212  38  1  1
 0   74  52  10  27.8  0.269  22  0  0    1  133 102  28  32.8  0.234  45  1  0
 0  119  64  18  34.9  0.725  23  0  0    5  155  84  44  38.7  0.619  34  0  1
 1  128  48  45  40.5  0.613  24  1  0    2  112  68  22  34.1  0.315  26  0  0
 1  140  74  26  24.1  0.828  23  0  1    2  141  58  34  25.4  0.699  24  0  1
 7  129  68  49  38.5  0.439  43  1  1    0  106  70  37  39.4  0.605  22  0  0
 1  118  58  36  33.3  0.261  23  0  1    8  155  62  26    34  0.543  46  1  0
;

data DiabetesStudy;
   set DiabetesStudy;
   Result = Diabetes;
   if Test=1 then Result=.;
run;

proc hplogistic data=DiabetesStudy;
   model Diabetes(event='1') = NPreg Glucose Pressure Triceps
                               BMI Pedigree Age;
   partition role=Test(test='1' train='0');
run;

proc gampl data=DiabetesStudy seed=12345;
   model Result(event='1') = spline(NPreg)    spline(Glucose)
                             spline(Pressure) spline(Triceps)
                             spline(BMI)      spline(Pedigree)
                             spline(Age) / dist=binary;
run;

ods graphics on;
proc gampl data=DiabetesStudy plots seed=12345;
   model Result(event='1') = spline(Glucose)
                             spline(Pedigree) spline(Age) / dist=binary;
   output out=DiabetesStudyOut;
   id Diabetes Test;
run;

data test;
   set DiabetesStudyOut(where=(Test=1));
   if ((Pred>0.5 & Diabetes=1) | (Pred<0.5 & Diabetes=0))
   then Error=0;
   else Error=1;
run;

proc freq data=test;
   tables Diabetes*Error/nocol norow;
run;