Skip to contents

Compute the area between curves (ABC) for each scoring method in the "precmed" object. This should be run only after results of catecv() have been obtained.

Usage

# S3 method for class 'precmed'
abc(x, combine = NULL, ...)

Arguments

x

An object of class "precmed".

combine

Optional summary across validation iterations for each scoring method. Use NULL (the default) for the full matrix, "mean" or "median", or a function returning one numeric value from a vector. Missing values are passed to the summary function unchanged; for example, use function(z) mean(z, na.rm = TRUE) to omit them explicitly.

...

Additional arguments (currently unused).

Value

Returns a matrix of numeric values with number of columns equal to the number cross-validation iteration and number of rows equal to the number of scoring methods in x. With combine, returns a named numeric vector with one value per method.

Details

The ABC is the area between a validation curve and the overall ATE in the validation set. It is calculated for each scoring method separately. Higher ABC values are preferable as they indicate that more treatment effect heterogeneity is captured by the scoring method. Negative values of ABC are possible if segments of the validation curve cross the overall ATE line. The ABC is calculated with the auc() in utility.R with a natural cubic spline interpolation. The calculation of the ABC is always based on validation curves based on 100 proportions equally spaced from min(prop.cutoff) to max(prop.cutoff).

The ABC is a metric to help users select the best scoring method in terms of capturing treatment effect heterogeneity in the data. It should be used in complement to the visual inspection of the validation curves in the validation set in plot().

References

Zhao, L., Tian, L., Cai, T., Claggett, B., & Wei, L. J. (2013). Effectively selecting a target population for a future comparative study. Journal of the American Statistical Association, 108(502), 527-539.

Jiang, X., Simoneau, G., Pellegrini, F., Shen, C., de Moor, C., & Tian, L. (2026). Visualization and interpretation of individualized treatment rule results. In T. P. A. Debray, T.-L. Nguyen, & R. W. Platt (Eds.), Comparative Effectiveness and Personalized Medicine Research Using Real-World Data (Chapter 20, pp. 513–536). Chapman & Hall/CRC. doi:10.1201/9781003300809-20

See also

catecv() function and plot(), boxplot() methods for "precmed" objects.

Examples

# The result was created with:
# catecvCountExample <- catecv(
#   response = "count", data = countExample, outcome_method = "poisson",
#   outcome_model = y ~ age + female + previous_treatment + previous_cost +
#     previous_number_relapses + offset(log(years)),
#   ps_model = trt ~ age + previous_treatment, higher.y = FALSE,
#   cv.n = 5, seed = 999, verbose = 0)
# Load the pre-fitted result instead of repeating the calculation.
data(catecvCountExample)
# Rows are scoring methods; columns are validation iterations.
abc(catecvCountExample)
#>               cv1       cv2       cv3        cv4       cv5
#> poisson 0.1375899 0.1172791 0.1120313 0.06136285 0.1877103
abc(catecvCountExample, combine = "mean")
#>   poisson 
#> 0.1231947 
abc(catecvCountExample, combine = median)
#>   poisson 
#> 0.1172791