Skip to contents

This function computes commonly used classification statistics of a confusion matrix and compares the area under the curve (AUC) across all consecutive categories of an ordinal variable. The function of roc.test () from the pROC package (https://cran.r-project.org/package=pROC) is used for AUC comparison.

Usage

group.auc.test(outcome,predictor, 
                      groups, cut.off='max.Youden',BR=1)

Arguments

outcome

The outcome variable indicating the status in the form of a data frame or matrix. This variable is typically coded as 0 (positive) and 1 (negative).

predictor

A numerical vector of scores used to predict the status of the outcome. This variable should be of the same length as the outcome variable (i.e., two variables are from the same data set and also of the same number of data rows).

groups

A data frame that contains all created indicator variables using the function group.to.vars () in this package.

cut.off

Specification of the criterion used to select the optimal cut score. Three options available: (1) 'max.Youden' returns the cut score that maximizes the Youden Index (the default); (2) 'max.sen' returns the cut score that maximizes the sensitivity; and (3) 'max.spe' returns the cut score that maximizes the specificity.

BR

Base rates or known prevalence. Multiple values can be specified simultaneously. By default BR=1.

Value

A list of two objects: (1) descriptive and classification statistics, and (2) results of the AUC comparison for each pair of the consecutive categories.

Summary.Stats

Summary and classification statistics for all participants and all the consecutive groups. The first row is the results of the entire sample and has a row name of "All", followed by results for each pair of the groups specified by group.to.vars (). For example, if the first indicator of age is age.40, then the second row of results will have the row name of "age.40" and includes results for participants with age at or below 40, the third row will have the row name of "age.40.1" and includes results for those with age beyond 40.
The results include the following statistics:
* N, the sample size for each category.
* TP, true positives.
* FP, false positives.
* FN, false negatives.
* TN, true negatives.
* Cut.off, the optimal cut score.
* AUC, Area under the ROC curve.
* AUC.SE, Standard error of AUC.
* AUC.low & AUC.up, '95 * Sensitivity, also true positive rate, y-axis of the ROC.
* Specificity, also true negative rate.
* Youden.Index.
* PPV or positive predictive value for each specified base rate.
* NPV or negative predictive value for each specified base rate.
* PPV for the sample.
* NPV for the sample.
* FNR, false negative rate, or miss rate.
* FPR, false positive rate, or fall-out rate.
* FOR, false omission rate.
* FDR, false discovery rate.
* Prevalence.
* Accuracy.
* PLR, positive likelihood ratio.
* NLR, negative likelihood ratio.
* DOR, Diagnostic odds ratio.

AUC.test

Results of the AUC comparison for each pair of the consecutive categories.

Examples

 
#read the example data
data(ROC.data.ex)
#create new binary variables for the ordinal variable
data.new.age<-group.to.vars(ROC.data.ex,
                            ROC.data.ex$age,
                           root.name='age')
#> [1] "A total number of 43 unique categories are identified"
#>  [1] 40 41 42 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
#> [26] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 83 84 87
#run the function
result.age<-group.auc.test(ROC.data.ex$outcome,ROC.data.ex$predictor, 
                           groups=data.new.age[,5:ncol(data.new.age)],
                           cut.off='max.Youden', BR=1)
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Warning: ci.auc() of a ROC curve with AUC == 1 is always 1-1 and can be misleading.
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Warning: ci.auc() of a ROC curve with AUC == 1 is always 1-1 and can be misleading.
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Warning: ci.auc() of a ROC curve with AUC == 1 is always 1-1 and can be misleading.
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#> Setting levels: control = 0, case = 1
#> Setting levels: control = 0, case = 1
#> Setting direction: controls < cases
#obtain results
result.age$Summary.Stats
#>            N   TP   FP   FN   TN Cut.off   AUC AUC.SE AUC.low AUC.up
#> All      241   54   33    1  153   66.79 0.962  0.011   0.941  0.984
#> age.40     1 <NA> <NA> <NA> <NA>    <NA>  <NA>   <NA>    <NA>   <NA>
#> age.40.1 240   54   33    1  152   66.79 0.962  0.011   0.940  0.984
#> age.41     8 <NA> <NA> <NA> <NA>    <NA>  <NA>   <NA>    <NA>   <NA>
#> age.41.1 233   54   33    1  145   66.79 0.961  0.011   0.938  0.983
#> age.42    12 <NA> <NA> <NA> <NA>    <NA>  <NA>   <NA>    <NA>   <NA>
#> age.42.1 229   54   33    1  141   66.79 0.960  0.012   0.937  0.983
#> age.45    15 <NA> <NA> <NA> <NA>    <NA>  <NA>   <NA>    <NA>   <NA>
#> age.45.1 226   54   33    1  138   66.79 0.959  0.012   0.936  0.982
#> age.46    23 <NA> <NA> <NA> <NA>    <NA>  <NA>   <NA>    <NA>   <NA>
#> age.46.1 218   54   30    1  133   66.79 0.963  0.011   0.941  0.985
#> age.47    24 <NA> <NA> <NA> <NA>    <NA>  <NA>   <NA>    <NA>   <NA>
#> age.47.1 217   54   30    1  132   66.79 0.963  0.011   0.941  0.985
#> age.48    25 <NA> <NA> <NA> <NA>    <NA>  <NA>   <NA>    <NA>   <NA>
#> age.48.1 216   54   30    1  131   66.79 0.963  0.011   0.940  0.985
#> age.49    32    2    1    0   29  90.215 0.967  0.017   0.901  1.000
#> age.49.1 209   52   27    1  129   66.79 0.963  0.011   0.941  0.985
#> age.50    36    4    7    0   25   66.67 0.918  0.042   0.811  1.000
#> age.50.1 205   50   26    1  128   66.84 0.965  0.011   0.944  0.987
#> age.51    38    4    7    0   27   66.72 0.923  0.039   0.822  1.000
#> age.51.1 203   50   26    1  126   66.84 0.965  0.011   0.943  0.987
#> age.52    42    4    9    0   29   66.72 0.918  0.042   0.806  1.000
#> age.52.1 199   50   24    1  124   66.84 0.967  0.011   0.946  0.988
#> age.53    47    4   11    0   32   66.72 0.904  0.049   0.785  1.000
#> age.53.1 194   50   22    1  121   66.84 0.973  0.010   0.954  0.992
#> age.54    52    4   11    0   37   66.72 0.914  0.044   0.807  1.000
#> age.54.1 189   50   22    1  116   66.84 0.972  0.010   0.952  0.991
#> age.55    55    4   11    0   40   66.72 0.919  0.041   0.818  1.000
#> age.55.1 186   50   22    1  113   66.84 0.971  0.010   0.951  0.991
#> age.56    58    4   11    0   43   66.72 0.924  0.039   0.828  1.000
#> age.56.1 183   50   22    1  110   66.84 0.970  0.011   0.950  0.991
#> age.57    66    4   12    0   50   66.72 0.929  0.036   0.840  1.000
#> age.57.1 175   50   21    1  103   66.84 0.969  0.011   0.948  0.991
#> age.58    73    4   12    0   57   66.72 0.937  0.032   0.856  1.000
#> age.58.1 168   50   21    1   96   66.84 0.967  0.011   0.945  0.990
#> age.59    86    5   12    0   69   66.72 0.957  0.022   0.899  1.000
#> age.59.1 155   49   21    1   84   66.84 0.963  0.013   0.938  0.989
#> age.60    95    9   13    0   73   66.72 0.975  0.013   0.940  1.000
#> age.60.1 146   45   20    1   80   66.84 0.960  0.014   0.933  0.988
#> age.61   108   15   15    0   78   66.72 0.938  0.024   0.891  0.985
#> age.61.1 133   36    4    4   89  73.635 0.977  0.011   0.954  0.999
#> age.62   125   20   15    0   90   66.72 0.955  0.017   0.922  0.989
#> age.62.1 116   31    4    4   77  73.635 0.971  0.014   0.943  0.999
#> age.63   132   20   15    0   97   66.72 0.958  0.016   0.926  0.990
#> age.63.1 109   31    4    4   70  73.635 0.968  0.016   0.938  0.998
#> age.64   147   26   15    0  106  66.755 0.960  0.014   0.933  0.988
#> age.64.1  94   26    4    3   61  73.635 0.969  0.016   0.934  1.000
#> age.65   155   27   15    1  112  66.755 0.958  0.014   0.930  0.987
#> age.65.1  86   25    4    2   55  73.635 0.980  0.010   0.956  1.000
#> age.66   159   27   16    1  115  66.755 0.957  0.015   0.928  0.986
#> age.66.1  82   25    4    2   51  73.635 0.978  0.011   0.953  1.000
#> age.67   164   27   17    1  119  66.755 0.957  0.015   0.928  0.985
#> age.67.1  77   23    0    4   50  86.555 0.978  0.011   0.952  1.000
#> age.68   174   30   19    1  124  66.755 0.959  0.014   0.931  0.986
#> age.68.1  67   20    0    4   43  86.555 0.975  0.013   0.945  1.000
#> age.69   189   40   21    1  127  66.755 0.963  0.012   0.940  0.987
#> age.69.1  52   12    0    2   38  86.555 0.974  0.013   0.934  1.000
#> age.70   193   40   21    1  131  66.755 0.964  0.012   0.942  0.987
#> age.70.1  48   12    0    2   34  86.555 0.971  0.015   0.927  1.000
#> age.71   196   42   22    1  131  66.755 0.965  0.011   0.942  0.987
#> age.71.1  45   10    0    2   33  86.555 0.970  0.015   0.924  1.000
#> age.72   204   42   24    1  137   66.79 0.964  0.012   0.941  0.987
#> age.72.1  37   12    4    0   21   68.24 0.973  0.014   0.930  1.000
#> age.73   208   42   28    1  137   66.79 0.960  0.012   0.936  0.985
#> age.73.1  33   12    2    0   19   68.24 0.984  0.008   0.954  1.000
#> age.74   210   42   30    1  137   66.79 0.959  0.013   0.933  0.984
#> age.74.1  31   12    2    0   17  68.125 0.982  0.009   0.949  1.000
#> age.75   216   43   31    1  141   66.79 0.959  0.013   0.934  0.984
#> age.75.1  25   11    1    0   13  68.125 0.987  0.007   0.956  1.000
#> age.76   221   43   31    1  146   66.79 0.960  0.012   0.936  0.984
#> age.76.1  20   11    1    0    8  68.125 0.980  0.010   0.932  1.000
#> age.77   229   46   31    1  151   66.79 0.964  0.011   0.941  0.986
#> age.77.1  12    8    1    0    3  68.125 0.938  0.032   0.791  1.000
#> age.78   232   49   31    1  151   66.79 0.966  0.011   0.945  0.987
#> age.78.1   9    5    1    0    3  68.125 0.900  0.051   0.670  1.000
#> age.79   233   49   31    1  152   66.79 0.966  0.011   0.945  0.987
#> age.79.1   8    5    1    0    2  68.125 0.867  0.068   0.560  1.000
#> age.80   234   49   32    1  152   66.79 0.965  0.011   0.943  0.986
#> age.80.1   7    3    0    2    2  77.645 1.000  0.000   1.000  1.000
#> age.81   235   50   32    1  152   66.79 0.965  0.011   0.944  0.986
#> age.81.1   6    4    1    0    1   63.96 1.000  0.000   1.000  1.000
#> age.83   237   52   32    1  152   66.79 0.966  0.011   0.945  0.987
#> age.83.1   4    2    1    0    1   63.96 1.000  0.000   1.000  1.000
#> age.84   239   52   33    1  153   66.79 0.966  0.011   0.945  0.986
#> age.84.1   2 <NA> <NA> <NA> <NA>    <NA>  <NA>   <NA>    <NA>   <NA>
#>          Sensitivity Specificity Youden.Index PPV(BR=1) NPV(BR=1) PPV.sample
#> All            0.982       0.823        0.804         1         0      0.621
#> age.40          <NA>        <NA>         <NA>      <NA>      <NA>       <NA>
#> age.40.1       0.982       0.822        0.803         1         0      0.621
#> age.41          <NA>        <NA>         <NA>      <NA>      <NA>       <NA>
#> age.41.1       0.982       0.815        0.796         1         0      0.621
#> age.42          <NA>        <NA>         <NA>      <NA>      <NA>       <NA>
#> age.42.1       0.982        0.81        0.792         1         0      0.621
#> age.45          <NA>        <NA>         <NA>      <NA>      <NA>       <NA>
#> age.45.1       0.982       0.807        0.789         1         0      0.621
#> age.46          <NA>        <NA>         <NA>      <NA>      <NA>       <NA>
#> age.46.1       0.982       0.816        0.798         1         0      0.643
#> age.47          <NA>        <NA>         <NA>      <NA>      <NA>       <NA>
#> age.47.1       0.982       0.815        0.797         1         0      0.643
#> age.48          <NA>        <NA>         <NA>      <NA>      <NA>       <NA>
#> age.48.1       0.982       0.814        0.795         1         0      0.643
#> age.49             1       0.967        0.967         1      <NA>      0.667
#> age.49.1       0.981       0.827        0.808         1         0      0.658
#> age.50             1       0.781        0.781         1      <NA>      0.364
#> age.50.1        0.98       0.831        0.812         1         0      0.658
#> age.51             1       0.794        0.794         1      <NA>      0.364
#> age.51.1        0.98       0.829        0.809         1         0      0.658
#> age.52             1       0.763        0.763         1      <NA>      0.308
#> age.52.1        0.98       0.838        0.818         1         0      0.676
#> age.53             1       0.744        0.744         1      <NA>      0.267
#> age.53.1        0.98       0.846        0.827         1         0      0.694
#> age.54             1       0.771        0.771         1      <NA>      0.267
#> age.54.1        0.98       0.841        0.821         1         0      0.694
#> age.55             1       0.784        0.784         1      <NA>      0.267
#> age.55.1        0.98       0.837        0.817         1         0      0.694
#> age.56             1       0.796        0.796         1      <NA>      0.267
#> age.56.1        0.98       0.833        0.814         1         0      0.694
#> age.57             1       0.806        0.806         1      <NA>       0.25
#> age.57.1        0.98       0.831        0.811         1         0      0.704
#> age.58             1       0.826        0.826         1      <NA>       0.25
#> age.58.1        0.98       0.821        0.801         1         0      0.704
#> age.59             1       0.852        0.852         1      <NA>      0.294
#> age.59.1        0.98         0.8         0.78         1         0        0.7
#> age.60             1       0.849        0.849         1      <NA>      0.409
#> age.60.1       0.978         0.8        0.778         1         0      0.692
#> age.61             1       0.839        0.839         1      <NA>        0.5
#> age.61.1         0.9       0.957        0.857         1         0        0.9
#> age.62             1       0.857        0.857         1      <NA>      0.571
#> age.62.1       0.886       0.951        0.836         1         0      0.886
#> age.63             1       0.866        0.866         1      <NA>      0.571
#> age.63.1       0.886       0.946        0.832         1         0      0.886
#> age.64             1       0.876        0.876         1      <NA>      0.634
#> age.64.1       0.897       0.938        0.835         1         0      0.867
#> age.65         0.964       0.882        0.846         1         0      0.643
#> age.65.1       0.926       0.932        0.858         1         0      0.862
#> age.66         0.964       0.878        0.842         1         0      0.628
#> age.66.1       0.926       0.927        0.853         1         0      0.862
#> age.67         0.964       0.875        0.839         1         0      0.614
#> age.67.1       0.852           1        0.852         1         0          1
#> age.68         0.968       0.867        0.835         1         0      0.612
#> age.68.1       0.833           1        0.833         1         0          1
#> age.69         0.976       0.858        0.834         1         0      0.656
#> age.69.1       0.857           1        0.857         1         0          1
#> age.70         0.976       0.862        0.837         1         0      0.656
#> age.70.1       0.857           1        0.857         1         0          1
#> age.71         0.977       0.856        0.833         1         0      0.656
#> age.71.1       0.833           1        0.833         1         0          1
#> age.72         0.977       0.851        0.828         1         0      0.636
#> age.72.1           1        0.84         0.84         1      <NA>       0.75
#> age.73         0.977        0.83        0.807         1         0        0.6
#> age.73.1           1       0.905        0.905         1      <NA>      0.857
#> age.74         0.977        0.82        0.797         1         0      0.583
#> age.74.1           1       0.895        0.895         1      <NA>      0.857
#> age.75         0.977        0.82        0.797         1         0      0.581
#> age.75.1           1       0.929        0.929         1      <NA>      0.917
#> age.76         0.977       0.825        0.802         1         0      0.581
#> age.76.1           1       0.889        0.889         1      <NA>      0.917
#> age.77         0.979        0.83        0.808         1         0      0.597
#> age.77.1           1        0.75         0.75         1      <NA>      0.889
#> age.78          0.98        0.83         0.81         1         0      0.613
#> age.78.1           1        0.75         0.75         1      <NA>      0.833
#> age.79          0.98       0.831        0.811         1         0      0.613
#> age.79.1           1       0.667        0.667         1      <NA>      0.833
#> age.80          0.98       0.826        0.806         1         0      0.605
#> age.80.1         0.6           1          0.6         1         0          1
#> age.81          0.98       0.826        0.806         1         0       0.61
#> age.81.1           1         0.5          0.5         1      <NA>        0.8
#> age.83         0.981       0.826        0.807         1         0      0.619
#> age.83.1           1         0.5          0.5         1      <NA>      0.667
#> age.84         0.981       0.823        0.804         1         0      0.612
#> age.84.1        <NA>        <NA>         <NA>      <NA>      <NA>       <NA>
#>          NPV.sample FNR/MissRate FPR/FallOut   FOR   FDR Prevalance Accuracy
#> All           0.994        0.018       0.177 0.006 0.379      0.228    0.859
#> age.40         <NA>         <NA>        <NA>  <NA>  <NA>       <NA>     <NA>
#> age.40.1      0.993        0.018       0.178 0.007 0.379      0.229    0.858
#> age.41         <NA>         <NA>        <NA>  <NA>  <NA>       <NA>     <NA>
#> age.41.1      0.993        0.018       0.185 0.007 0.379      0.236    0.854
#> age.42         <NA>         <NA>        <NA>  <NA>  <NA>       <NA>     <NA>
#> age.42.1      0.993        0.018        0.19 0.007 0.379       0.24    0.852
#> age.45         <NA>         <NA>        <NA>  <NA>  <NA>       <NA>     <NA>
#> age.45.1      0.993        0.018       0.193 0.007 0.379      0.243     0.85
#> age.46         <NA>         <NA>        <NA>  <NA>  <NA>       <NA>     <NA>
#> age.46.1      0.993        0.018       0.184 0.007 0.357      0.252    0.858
#> age.47         <NA>         <NA>        <NA>  <NA>  <NA>       <NA>     <NA>
#> age.47.1      0.992        0.018       0.185 0.008 0.357      0.253    0.857
#> age.48         <NA>         <NA>        <NA>  <NA>  <NA>       <NA>     <NA>
#> age.48.1      0.992        0.018       0.186 0.008 0.357      0.255    0.856
#> age.49            1            0       0.033     0 0.333      0.062    0.969
#> age.49.1      0.992        0.019       0.173 0.008 0.342      0.254    0.866
#> age.50            1            0       0.219     0 0.636      0.111    0.806
#> age.50.1      0.992         0.02       0.169 0.008 0.342      0.249    0.868
#> age.51            1            0       0.206     0 0.636      0.105    0.816
#> age.51.1      0.992         0.02       0.171 0.008 0.342      0.251    0.867
#> age.52            1            0       0.237     0 0.692      0.095    0.786
#> age.52.1      0.992         0.02       0.162 0.008 0.324      0.256    0.874
#> age.53            1            0       0.256     0 0.733      0.085    0.766
#> age.53.1      0.992         0.02       0.154 0.008 0.306      0.263    0.881
#> age.54            1            0       0.229     0 0.733      0.077    0.788
#> age.54.1      0.991         0.02       0.159 0.009 0.306       0.27    0.878
#> age.55            1            0       0.216     0 0.733      0.073      0.8
#> age.55.1      0.991         0.02       0.163 0.009 0.306      0.274    0.876
#> age.56            1            0       0.204     0 0.733      0.069     0.81
#> age.56.1      0.991         0.02       0.167 0.009 0.306      0.279    0.874
#> age.57            1            0       0.194     0  0.75      0.061    0.818
#> age.57.1       0.99         0.02       0.169  0.01 0.296      0.291    0.874
#> age.58            1            0       0.174     0  0.75      0.055    0.836
#> age.58.1       0.99         0.02       0.179  0.01 0.296      0.304    0.869
#> age.59            1            0       0.148     0 0.706      0.058     0.86
#> age.59.1      0.988         0.02         0.2 0.012   0.3      0.323    0.858
#> age.60            1            0       0.151     0 0.591      0.095    0.863
#> age.60.1      0.988        0.022         0.2 0.012 0.308      0.315    0.856
#> age.61            1            0       0.161     0   0.5      0.139    0.861
#> age.61.1      0.957          0.1       0.043 0.043   0.1      0.301     0.94
#> age.62            1            0       0.143     0 0.429       0.16     0.88
#> age.62.1      0.951        0.114       0.049 0.049 0.114      0.302    0.931
#> age.63            1            0       0.134     0 0.429      0.152    0.886
#> age.63.1      0.946        0.114       0.054 0.054 0.114      0.321    0.927
#> age.64            1            0       0.124     0 0.366      0.177    0.898
#> age.64.1      0.953        0.103       0.062 0.047 0.133      0.309    0.926
#> age.65        0.991        0.036       0.118 0.009 0.357      0.181    0.897
#> age.65.1      0.965        0.074       0.068 0.035 0.138      0.314     0.93
#> age.66        0.991        0.036       0.122 0.009 0.372      0.176    0.893
#> age.66.1      0.962        0.074       0.073 0.038 0.138      0.329    0.927
#> age.67        0.992        0.036       0.125 0.008 0.386      0.171     0.89
#> age.67.1      0.926        0.148           0 0.074     0      0.351    0.948
#> age.68        0.992        0.032       0.133 0.008 0.388      0.178    0.885
#> age.68.1      0.915        0.167           0 0.085     0      0.358     0.94
#> age.69        0.992        0.024       0.142 0.008 0.344      0.217    0.884
#> age.69.1       0.95        0.143           0  0.05     0      0.269    0.962
#> age.70        0.992        0.024       0.138 0.008 0.344      0.212    0.886
#> age.70.1      0.944        0.143           0 0.056     0      0.292    0.958
#> age.71        0.992        0.023       0.144 0.008 0.344      0.219    0.883
#> age.71.1      0.943        0.167           0 0.057     0      0.267    0.956
#> age.72        0.993        0.023       0.149 0.007 0.364      0.211    0.877
#> age.72.1          1            0        0.16     0  0.25      0.324    0.892
#> age.73        0.993        0.023        0.17 0.007   0.4      0.207    0.861
#> age.73.1          1            0       0.095     0 0.143      0.364    0.939
#> age.74        0.993        0.023        0.18 0.007 0.417      0.205    0.852
#> age.74.1          1            0       0.105     0 0.143      0.387    0.935
#> age.75        0.993        0.023        0.18 0.007 0.419      0.204    0.852
#> age.75.1          1            0       0.071     0 0.083       0.44     0.96
#> age.76        0.993        0.023       0.175 0.007 0.419      0.199    0.855
#> age.76.1          1            0       0.111     0 0.083       0.55     0.95
#> age.77        0.993        0.021        0.17 0.007 0.403      0.205     0.86
#> age.77.1          1            0        0.25     0 0.111      0.667    0.917
#> age.78        0.993         0.02        0.17 0.007 0.388      0.216    0.862
#> age.78.1          1            0        0.25     0 0.167      0.556    0.889
#> age.79        0.993         0.02       0.169 0.007 0.388      0.215    0.863
#> age.79.1          1            0       0.333     0 0.167      0.625    0.875
#> age.80        0.993         0.02       0.174 0.007 0.395      0.214    0.859
#> age.80.1        0.5          0.4           0   0.5     0      0.714    0.714
#> age.81        0.993         0.02       0.174 0.007  0.39      0.217     0.86
#> age.81.1          1            0         0.5     0   0.2      0.667    0.833
#> age.83        0.993        0.019       0.174 0.007 0.381      0.224    0.861
#> age.83.1          1            0         0.5     0 0.333        0.5     0.75
#> age.84        0.994        0.019       0.177 0.006 0.388      0.222    0.858
#> age.84.1       <NA>         <NA>        <NA>  <NA>  <NA>       <NA>     <NA>
#>             PLR   NLR     DOR
#> All       5.534 0.022 250.364
#> age.40     <NA>  <NA>    <NA>
#> age.40.1  5.504 0.022 248.727
#> age.41     <NA>  <NA>    <NA>
#> age.41.1  5.296 0.022 237.273
#> age.42     <NA>  <NA>    <NA>
#> age.42.1  5.177 0.022 230.727
#> age.45     <NA>  <NA>    <NA>
#> age.45.1  5.088 0.023 225.818
#> age.46     <NA>  <NA>    <NA>
#> age.46.1  5.335 0.022   239.4
#> age.47     <NA>  <NA>    <NA>
#> age.47.1  5.302 0.022   237.6
#> age.48     <NA>  <NA>    <NA>
#> age.48.1  5.269 0.022   235.8
#> age.49       30     0     Inf
#> age.49.1  5.669 0.023 248.444
#> age.50    4.571     0     Inf
#> age.50.1  5.807 0.024 246.154
#> age.51    4.857     0     Inf
#> age.51.1  5.732 0.024 242.308
#> age.52    4.222     0     Inf
#> age.52.1  6.046 0.023 258.333
#> age.53    3.909     0     Inf
#> age.53.1  6.373 0.023     275
#> age.54    4.364     0     Inf
#> age.54.1   6.15 0.023 263.636
#> age.55    4.636     0     Inf
#> age.55.1  6.016 0.023 256.818
#> age.56    4.909     0     Inf
#> age.56.1  5.882 0.024     250
#> age.57    5.167     0     Inf
#> age.57.1  5.789 0.024 245.238
#> age.58     5.75     0     Inf
#> age.58.1  5.462 0.024 228.571
#> age.59     6.75     0     Inf
#> age.59.1    4.9 0.025     196
#> age.60    6.615     0     Inf
#> age.60.1  4.891 0.027     180
#> age.61      6.2     0     Inf
#> age.61.1 20.925 0.104  200.25
#> age.62        7     0     Inf
#> age.62.1 17.936  0.12 149.188
#> age.63    7.467     0     Inf
#> age.63.1 16.386 0.121 135.625
#> age.64    8.067     0     Inf
#> age.64.1 14.569  0.11 132.167
#> age.65    8.164  0.04   201.6
#> age.65.1 13.657 0.079 171.875
#> age.66    7.895 0.041 194.063
#> age.66.1 12.731  0.08 159.375
#> age.67    7.714 0.041     189
#> age.67.1    Inf 0.148     Inf
#> age.68    7.284 0.037 195.789
#> age.68.1    Inf 0.167     Inf
#> age.69    6.876 0.028 241.905
#> age.69.1    Inf 0.143     Inf
#> age.70    7.062 0.028 249.524
#> age.70.1    Inf 0.143     Inf
#> age.71    6.793 0.027 250.091
#> age.71.1    Inf 0.167     Inf
#> age.72    6.552 0.027  239.75
#> age.72.1   6.25     0     Inf
#> age.73    5.756 0.028   205.5
#> age.73.1   10.5     0     Inf
#> age.74    5.437 0.028   191.8
#> age.74.1    9.5     0     Inf
#> age.75    5.422 0.028 195.581
#> age.75.1     14     0     Inf
#> age.76     5.58 0.028 202.516
#> age.76.1      9     0     Inf
#> age.77    5.746 0.026 224.065
#> age.77.1      4     0     Inf
#> age.78    5.754 0.024 238.677
#> age.78.1      4     0     Inf
#> age.79    5.785 0.024 240.258
#> age.79.1      3     0     Inf
#> age.80    5.635 0.024  232.75
#> age.80.1    Inf   0.4     Inf
#> age.81    5.637 0.024   237.5
#> age.81.1      2     0     Inf
#> age.83    5.642 0.023     247
#> age.83.1      2     0     Inf
#> age.84     5.53 0.023 241.091
#> age.84.1   <NA>  <NA>    <NA>
result.age$AUC.test
#>     Group N.0 AUC.0 AUC.SE.0 N.1 AUC.1 AUC.SE.1 AUC.diff      Z p.value
#> 1  age.40   1  <NA>     <NA> 240 0.962    0.011     <NA>   <NA>    <NA>
#> 2  age.41   8  <NA>     <NA> 233 0.961    0.011     <NA>   <NA>    <NA>
#> 3  age.42  12  <NA>     <NA> 229 0.960    0.012     <NA>   <NA>    <NA>
#> 4  age.45  15  <NA>     <NA> 226 0.959    0.012     <NA>   <NA>    <NA>
#> 5  age.46  23  <NA>     <NA> 218 0.963    0.011     <NA>   <NA>    <NA>
#> 6  age.47  24  <NA>     <NA> 217 0.963    0.011     <NA>   <NA>    <NA>
#> 7  age.48  25  <NA>     <NA> 216 0.963    0.011     <NA>   <NA>    <NA>
#> 8  age.49  32 0.967    0.017 209 0.963    0.011   -0.003  0.099   0.921
#> 9  age.50  36 0.918    0.042 205 0.965    0.011    0.048 -0.851     0.4
#> 10 age.51  38 0.923    0.039 203 0.965    0.011    0.042 -0.803   0.427
#> 11 age.52  42 0.918    0.042 199 0.967    0.011    0.049 -0.852   0.399
#> 12 age.53  47 0.904    0.049 194 0.973    0.010    0.069 -1.115    0.27
#> 13 age.54  52 0.914    0.044 189 0.972    0.010    0.058 -1.038   0.304
#> 14 age.55  55 0.919    0.041 186 0.971    0.010    0.052  -0.99   0.326
#> 15 age.56  58 0.924    0.039 183 0.970    0.011    0.047  -0.94   0.351
#> 16 age.57  66 0.929    0.036 175 0.969    0.011     0.04 -0.847     0.4
#> 17 age.58  73 0.937    0.032 168 0.967    0.011    0.031 -0.722   0.472
#> 18 age.59  86 0.957    0.022 155 0.963    0.013    0.006 -0.194   0.847
#> 19 age.60  95 0.975    0.013 146 0.960    0.014   -0.014  0.629    0.53
#> 20 age.61 108 0.938    0.024 133 0.977    0.011    0.039 -1.464   0.145
#> 21 age.62 125 0.955    0.017 116 0.971    0.014    0.015 -0.682   0.496
#> 22 age.63 132 0.958    0.016 109 0.968    0.016     0.01 -0.432   0.666
#> 23 age.64 147 0.960    0.014  94 0.969    0.016    0.008 -0.366   0.715
#> 24 age.65 155 0.958    0.014  86 0.980    0.010    0.022  -1.15   0.251
#> 25 age.66 159 0.957    0.015  82 0.978    0.011    0.022   -1.1   0.272
#> 26 age.67 164 0.957    0.015  77 0.978    0.011    0.021 -1.067   0.287
#> 27 age.68 174 0.959    0.014  67 0.975    0.013    0.016 -0.786   0.433
#> 28 age.69 189 0.963    0.012  52 0.974    0.013     0.01 -0.436   0.664
#> 29 age.70 193 0.964    0.012  48 0.971    0.015    0.006 -0.243   0.809
#> 30 age.71 196 0.965    0.011  45 0.970    0.015    0.005 -0.199   0.843
#> 31 age.72 204 0.964    0.012  37 0.973    0.014     0.01 -0.384   0.702
#> 32 age.73 208 0.960    0.012  33 0.984    0.008    0.024 -1.212   0.229
#> 33 age.74 210 0.959    0.013  31 0.982    0.009    0.024 -1.117   0.268
#> 34 age.75 216 0.959    0.013  25 0.987    0.007    0.028 -1.382   0.172
#> 35 age.76 221 0.960    0.012  20 0.980    0.010    0.019 -0.712   0.482
#> 36 age.77 229 0.964    0.011  12 0.938    0.032   -0.026  0.345   0.736
#> 37 age.78 232 0.966    0.011   9 0.900    0.051   -0.066  0.559   0.592
#> 38 age.79 233 0.966    0.011   8 0.867    0.068   -0.099  0.634   0.546
#> 39 age.80 234 0.965    0.011   7 1.000    0.000    0.035 -3.204   0.002
#> 40 age.81 235 0.965    0.011   6 1.000    0.000    0.035 -3.213   0.001
#> 41 age.83 237 0.966    0.011   4 1.000    0.000    0.034 -3.227   0.001
#> 42 age.84 239 0.966    0.011   2  <NA>     <NA>     <NA>   <NA>    <NA>