comparebcJ {rocbc} | R Documentation |
Performs inference to compare the Youden Indices of two correlated (or uncorrelated) Box-Cox transformed biomarkers at a given nominal level
Description
This function provides a comparison of two correlated markers in terms of their J (Youden indices for Box-Cox based ROC curves). Marker measurements are assumed to be taken on the same individuals for both markers.
Usage
comparebcJ(marker1, marker2, D, alpha, plots)
Arguments
marker1 |
A vector of length n that contains the biomarker scores of all individuals for the first marker. |
marker2 |
A vector of length n that contains the biomarker scores of all individuals for the second marker. |
D |
A vector of length n that contains the true disease status of an individual, where 0 denotes a healthy/control individual, and 1 denotes a diseased individual. |
alpha |
Nominal level used to calculate the confidence intervals. A common choice is 0.05. |
plots |
Valid inputs are "on" and "off". When set to "on" it returns the Box-Cox based ROC along with informative information about the two AUCs in the legend of the plot. |
Value
resultstable |
A summary table of the comparison that contains the maximized Youden Index of each marker, the p-value of the difference using the probit transformation, the p-value of the difference, and the confidence interval of the difference. |
J1 |
The maximized Youden Index of the first marker. |
J2 |
The maximized Youden Index of the second marker. |
pvalue_probit_difference |
The p-value for the comparison of the Js. It employs the probit transformation that has greater power than when not using it (as in pvalue_difference). |
pvalue_difference |
The p-value for the comparisons of the Js (without the probit transformation). Simulations have shown that this is inferior to the ‘pvalue_probit_difference’. |
CI_difference |
The confidence interval for the difference of the Js. |
roc1 |
A function that refers to the ROC of the first marker. It allows the user to feed in FPR values and the corresponding TPR values. |
roc2 |
A function that refers to the ROC of the first marker. It allows the user to feed in FPR values and the corresponding TPR values. |
transx1 |
The Box-Cox transformed scores for the first marker and the healthy group. |
transy1 |
The Box-Cox transformed scores for the first marker and the diseased group. |
transformation.parameter.1 |
The estimated Box-Cox transformation parameter (lambda) for marker 1. |
transx2 |
The Box-Cox transformed scores for the second marker and the healthy group. |
transy2 |
The Box-Cox transformed scores for the second marker and the diseased group. |
transformation.parameter.2 |
The estimated Box-Cox transformation parameter (lambda) for marker 2. |
Author(s)
Leonidas Bantis
References
Bantis LE, Nakas CT, Reiser B. (2021). Statistical inference for the difference between two maximized Youden indices obtained from correlated biomarkers. Biometrical Journal, 63(6):1241-1253. https://doi.org/10.1002/bimj.202000128
Examples
#GENERATE SOME BIVARIATE DATA===
set.seed(123)
nx <- 100
Sx <- matrix(c(1, 0.5,
0.5, 1),
nrow = 2, ncol = 2)
mux <- c(X = 10, Y = 12)
X=mvtnorm::rmvnorm(nx, mean = mux, sigma = Sx)
ny <- 100
Sy <- matrix(c(1.1, 0.6,
0.6, 1.1),
nrow = 2, ncol = 2)
muy <- c(X = 11, Y = 13.7)
Y=mvtnorm::rmvnorm(ny, mean = muy, sigma = Sy)
dx=pracma::zeros(nx,1)
dy=pracma::ones(ny,1)
markers=rbind(X,Y);
marker1=markers[,1]
marker2=markers[,2]
D=c(rbind(dx,dy))
#===COMPARE THE Js of Marker 1 vs Marker 2
out=comparebcJ(marker1, marker2, D, alpha=0.05, plots="on")