} row.setInt(“TotalCount”, ages.size()); // display progress println(); println(); println(); println(); println(); println(); println(); println(“Calculating “ + 100*rowCount2/output.getRowCount() + “% complete (“ + rowCount2 + “/”+output.getRowCount()+”)”);/**/ } // create file String fileName = “ConcordanceMetricOutput.csv”; println(“RowCount: “ + rowCount); saveTable(output, “output/” + fileName); println(“File \”” + fileName + “\” created with “ + output.getRowCount() + “ rows”); println(“Program terminated”); } // determine if an integer value is valid int NaN(int n) { if (n > 0) { return n; } return -1; } // determine if a float value is valid float NaN(float n) { if (n >= 0) { return n; } return -1; } // calculate the concordance score given lists of ages and errors float calcScore(FloatList input, FloatList error) { if (input.size() != error.size()) { return -1; } int total = 0; int concordant = 0; int count = input.size(); if (count < 2) { return -1; } for (int i = 0; i < count-1; i++) { for (int j = i+1; j < count; j++) { total++; int prev = concordant; float in1 = input.get(i); float in2 = input.get(j); float err1 = error.get(i); float err2 = error.get(j); if (err1 < 0) { err1 = in1/10.0; } if (err2 < 0) { err2 = in2/10.0; } if (in1 > in2) { if (in1-err1 <= in2+err2) { concordant++; } } else if (in2 > in1) { if (in2-err2 <= in1+err1) { concordant++; } } else { concordant++; } } } return float(concordant)/total; } BEACHY, KINARD AND GARNER How often do radioisotope ages agree? 2023 ICC 400
RkJQdWJsaXNoZXIy MTM4ODY=