Title: | Estimating Specificity at Controlled Sensitivity, or Vice Versa |
---|---|
Description: | Perform biomarker evaluation and comparison in terms of specificity at a controlled sensitivity level, or sensitivity at a controlled specificity level. Point estimation and exact bootstrap of Huang, Parakati, Patil, and Sanda (2023) <doi:10.5705/ss.202021.0020> for the one- and two-biomarker problems are implemented. |
Authors: | Yijian Huang <[email protected]> |
Maintainer: | Yijian Huang <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.3 |
Built: | 2024-10-31 22:25:41 UTC |
Source: | CRAN |
Point estimation and exact bootstrap-based inference
snsp1m(mk, n1, s0, covp=0.95, fixsens=TRUE, lbmdis=TRUE)
snsp1m(mk, n1, s0, covp=0.95, fixsens=TRUE, lbmdis=TRUE)
mk |
biomarker values of cases followed by controls. |
n1 |
size of cases. |
s0 |
controlled level of sensitivity or specificity. |
covp |
norminal level of confidence intervals. |
fixsens |
fixing sensitivity if True, and specificity otherwise. |
lbmdis |
larger biomarker value is more associated with cases if True, and controls otherwise. |
threshold |
estimated threshold, at and beyond which the empirical sensitivity or specificity is the smallest no less than the controlled level s0. |
hss |
hss[1]: empirical point estimate of specificity at controlled sensitivity, or vice versa; hss[2]: oscillating bias-corrected estimate. |
hvar1 |
estimated variance component from cases if specificity at controlled sensitivity is estimated, or from controls otherwise. |
hvar2 |
estimated variance component from controls if specificity at controlled sensitivity is estimated, or from cases otherwise. |
hvar |
exact bootstrap variance estimate, =hvar1+hvar2. |
btpdf |
exact bootstrap probability mass function at (0:n0)/n0 with n0 being the size of controls if sensitivity is controlled, or at (0:n1)/n1 otherwise. |
wald_ci |
wald_ci[1,]: Wald confidence interval using hss[1]; wald_ci[2,]: Wald confidence interval using hss[2]. |
pct_ci |
percentile confidence interval. |
scr_ci |
scr_ci[1,]: score confidence interval using hss[1]; scr_ci[2,]: score confidence interval using hss[2]. |
zq_ci |
exact bootstrap version of the BTII in Zhou and Qin (2005, Statistics in Medicine 24, pp 465–477). |
Yijian Huang
Huang, Y., Parakati, I., Patil, D. H.,and Sanda, M. G. (2023). Interval estimation for operating characteristic of continuous biomarkers with controlled sensitivity or specificity, Statistica Sinica 33, 193–214.
## simulate biomarkers of 100 cases and 100 controls set.seed(1234) mk <- c(rnorm(100,1,1),rnorm(100,0,1)) ## estimate specificity at controlled 0.95 sensitivity est <- snsp1m(mk, 100, 0.95)
## simulate biomarkers of 100 cases and 100 controls set.seed(1234) mk <- c(rnorm(100,1,1),rnorm(100,0,1)) ## estimate specificity at controlled 0.95 sensitivity est <- snsp1m(mk, 100, 0.95)
Point estimation and exact bootstrap-based inference
snsp2mp(mk, n1, s0, covp=0.95, fixsens=TRUE, lbmdis=TRUE)
snsp2mp(mk, n1, s0, covp=0.95, fixsens=TRUE, lbmdis=TRUE)
mk |
Each of two rows corresponds to a biomarker, cases followed by controls. |
n1 |
case size. |
s0 |
controlled level of sensitivity or specificity. |
covp |
norminal level of confidence intervals. |
fixsens |
fixing sensitivity if True, and specificity otherwise. |
lbmdis |
larger value of a biomarker is more associated with cases if True, and controls otherwise. |
diff |
diff[1]: difference of empirical point estimates; hss[2]: difference of oscillating bias-corrected estimates. |
btmn |
bootstrap mean of the empirical difference. |
btva |
exact bootstrap variance estimate for diff[1]. |
btdist |
exact bootstrap probability mass function at (-n0:n0)/n0 with n0 being the size of controls if sensitivity is controlled, or at (-n1:n1)/n1 otherwise. |
wald_ci |
wald_ci[1,]: Wald confidence interval using diff[1]; wald_ci[2,]: Wald confidence interval using diff[2]. |
pct_ci |
percentile confidence interval. |
scr_ci |
scr_ci[1,]: score confidence interval using diff[1]; scr_ci[2,]: score confidence interval using diff[2]. |
zq_ci |
extension of the BTII in Zhou and Qin (2005, Statistics in Medicine 24, pp 465–477). |
Yijian Huang
Huang, Y., Parakati, I., Patil, D. H.,and Sanda, M. G. (2023). Interval estimation for operating characteristic of continuous biomarkers with controlled sensitivity or specificity, Statistica Sinica 33, 193–214.
## simulate paired biomarkers X and Y, with correlation 0.5, 100 cases and 100 controls n1 <- 100 n0 <- 100 rho <- 0.5 set.seed(1234) mkx <- rnorm(n1+n0,0,1) mky <- rho*mkx + sqrt(1-rho^2)*rnorm(n1+n0,0,1) mkx <- mkx + c(rep(2,n1),rep(0,n0)) mky <- mky + c(rep(1,n1),rep(0,n0)) mk <- rbind(mkx,mky) ## compare specificity at controlled 0.95 sensitivity est <- snsp2mp(mk, 100, 0.95)
## simulate paired biomarkers X and Y, with correlation 0.5, 100 cases and 100 controls n1 <- 100 n0 <- 100 rho <- 0.5 set.seed(1234) mkx <- rnorm(n1+n0,0,1) mky <- rho*mkx + sqrt(1-rho^2)*rnorm(n1+n0,0,1) mkx <- mkx + c(rep(2,n1),rep(0,n0)) mky <- mky + c(rep(1,n1),rep(0,n0)) mk <- rbind(mkx,mky) ## compare specificity at controlled 0.95 sensitivity est <- snsp2mp(mk, 100, 0.95)
Point estimation and exact bootstrap-based inference
snsp2mup(mkx, n1x, mky, n1y, s0, covp=0.95, fixsens=TRUE, lbmdisx=TRUE, lbmdisy=TRUE)
snsp2mup(mkx, n1x, mky, n1y, s0, covp=0.95, fixsens=TRUE, lbmdisx=TRUE, lbmdisy=TRUE)
mkx |
values of biomarker X, cases followed by controls. |
n1x |
case size of biomarker X. |
mky |
values of biomarker Y, cases followed by controls. |
n1y |
case size of biomarker Y. |
s0 |
controlled level of sensitivity or specificity. |
covp |
norminal level of confidence intervals. |
fixsens |
fixing sensitivity if True, and specificity otherwise. |
lbmdisx |
larger value of biomarker X is more associated with cases if True, and controls otherwise. |
lbmdisy |
larger value of biomarker Y is more associated with cases if True, and controls otherwise. |
diff |
diff[1]: difference of empirical point estimates; diff[2]: difference of oscillating bias-corrected estimates. |
hvar |
exact bootstrap variance estimate for diff[1]. |
wald_ci |
wald_ci[1,]: Wald confidence interval using diff[1]; wald_ci[2,]: Wald confidence interval using diff[2]. |
pct_ci |
percentile confidence interval. |
scr_ci |
scr_ci[1,]: score confidence interval using diff[1]; scr_ci[2,]: score confidence interval using diff[2]. |
zq_ci |
extension of the BTII in Zhou and Qin (2005, Statistics in Medicine 24, pp 465–477). |
Yijian Huang
Huang, Y., Parakati, I., Patil, D. H.,and Sanda, M. G. (2023). Interval estimation for operating characteristic of continuous biomarkers with controlled sensitivity or specificity, Statistica Sinica 33, 193–214.
set.seed(1234) ## simulate biomarker X with 100 cases and 100 controls mkx <- c(rnorm(100,2,1),rnorm(100,0,1)) ## simulate biomarker Y with 100 cases and 100 controls mky <- c(rnorm(100,1,1),rnorm(100,0,1)) ## compare specificity at controlled 0.95 sensitivity est <- snsp2mup(mkx, 100, mky, 100, 0.95)
set.seed(1234) ## simulate biomarker X with 100 cases and 100 controls mkx <- c(rnorm(100,2,1),rnorm(100,0,1)) ## simulate biomarker Y with 100 cases and 100 controls mky <- c(rnorm(100,1,1),rnorm(100,0,1)) ## compare specificity at controlled 0.95 sensitivity est <- snsp2mup(mkx, 100, mky, 100, 0.95)