asy_cov_tcf {bcROCsurface} | R Documentation |
Asymptotic variance-covariance estimation for True Class Fractions (TCFs) at the cut point (c_1, c_2)
Description
asy_cov_tcf
computes the asymptotic variance-covariance matrix of full data (FULL) and bias-corrected estimators (i.e. full imputation, mean score imputation, inverse probability weighting, semiparametric efficient and K nearest neighbor) of TCFs.
Usage
asy_cov_tcf(
obj_tcf,
diag_test,
dise_vec,
veri_stat = NULL,
rho_est = NULL,
pi_est = NULL,
boot = FALSE,
n_boot = 250,
parallel = FALSE,
ncpus = ifelse(parallel, detectCores()/2, NULL)
)
Arguments
obj_tcf |
a result of a call to |
diag_test |
a numeric vector containing the diagnostic test values. |
dise_vec |
a n * 3 binary matrix with three columns, corresponding to the three classes of the disease status. In row i, 1 in column j indicates that the i-th subject belongs to class j, with j = 1, 2, 3. A row of |
veri_stat |
a binary vector containing the verification status (1 verified, 0 not verified). |
rho_est |
a result of a call to |
pi_est |
a result of a call to |
boot |
a logical value. Default = |
n_boot |
the number of bootstrap replicates, used when |
parallel |
a logical value. If |
ncpus |
number of processes to be used in parallel computing. Default is half of available cores. |
Details
For bias-corrected estimators of TCFs, the asymptotic variance-covariance matrix at a fixed cut point is estimated by using the Delta method. The function asy_cov_tcf
implements the explicit forms presented in To Duc et al. (2016, 2020). In addition, the bootstrap procedure is also available.
For FULL estimator, the asymptotic variance-covariance matrix is computed via bootstrap only.
Value
This function returns an estimated asymptotic variance-covariance matrix for FULL estimator and bias-corrected estimators of TCFs at a fixed cut point.
References
To Duc, K., Chiogna, M. and Adimari, G. (2016) Bias-corrected methods for estimating the receiver operating characteristic surface of continuous diagnostic tests. Electronic Journal of Statistics, 10, 3063-3113.
To Duc, K., Chiogna, M. and Adimari, G. (2020) Nonparametric estimation of ROC surfaces in presence of verification bias. REVSTAT-Statistical Journal. 18, 5, 697–720.
Examples
data(EOC)
# FULL data estimator
dise_full <- pre_data(EOC$D.full, EOC$CA125)
dise_vec_full <- dise_full$dise_vec
full_tcf <- rocs.tcf("full", diag_test = EOC$CA125, dise_vec = dise_vec_full,
cps = c(2, 4))
full_var <- asy_cov_tcf(full_tcf, diag_test = EOC$CA125,
dise_vec = dise_vec_full)
# Preparing the missing disease status
dise_na <- pre_data(EOC$D, EOC$CA125)
dise_vec_na <- dise_na$dise_vec
dise_fact_na <- dise_na$dise
rho_out <- rho_mlogit(dise_fact_na ~ CA125 + CA153 + Age, data = EOC,
test = TRUE)
## FI estimator
fi_tcf <- rocs.tcf("fi", diag_test = EOC$CA125, dise_vec = dise_vec_na,
veri_stat = EOC$V, rho_est = rho_out, cps = c(2, 4))
fi_var <- asy_cov_tcf(fi_tcf, diag_test = EOC$CA125, dise_vec = dise_vec_na,
veri_stat = EOC$V, rho_est = rho_out)
## MSI estimator
msi_tcf <- rocs.tcf("msi", diag_test = EOC$CA125, dise_vec = dise_vec_na,
veri_stat = EOC$V, rho_est = rho_out, cps = c(2, 4))
msi_var <- asy_cov_tcf(msi_tcf, diag_test = EOC$CA125,
dise_vec = dise_vec_na, veri_stat = EOC$V,
rho_est = rho_out)
## IPW estimator
pi_out <- psglm(V ~ CA125 + CA153 + Age, data = EOC, test = TRUE)
ipw_tcf <- rocs.tcf("ipw", diag_test = EOC$CA125, dise_vec = dise_vec_na,
veri_stat = EOC$V, pi_est = pi_out, cps = c(2, 4))
ipw_var <- asy_cov_tcf(ipw_tcf, diag_test = EOC$CA125,
dise_vec = dise_vec_na, veri_stat = EOC$V,
pi_est = pi_out)
## SPE estimator
spe_tcf <- rocs.tcf("spe", diag_test = EOC$CA125, dise_vec = dise_vec_na,
veri_stat = EOC$V, rho_est = rho_out, pi_est = pi_out,
cps = c(2, 4))
spe_var <- asy_cov_tcf(spe_tcf, diag_test = EOC$CA125,
dise_vec = dise_vec_na, veri_stat = EOC$V,
rho_est = rho_out, pi_est = pi_out)
## KNN estimators
x_mat <- cbind(EOC$CA125, EOC$CA153, EOC$Age)
rho_1nn <- rho_knn(x_mat = x_mat, dise_vec = dise_vec_na, veri_stat = EOC$V,
k = 1, type = "mahala")
knn_tcf <- rocs.tcf("knn", diag_test = EOC$CA125, dise_vec = dise_vec_na,
veri_stat = EOC$V, rho_est = rho_1nn, cps = c(2, 4))
knn_var <- asy_cov_tcf(knn_tcf, diag_test = EOC$CA125,
dise_vec = dise_vec_na, veri_stat = EOC$V,
rho_est = rho_1nn)