clus_tcfs {ClusROC}R Documentation

Estimation of the covariate-specific TCFs for clustered data.

Description

clus_tcfs estimates covariate-specific True Class Fractions (TCFs), at a specified pair of thresholds, of a continuous diagnostic test in a clustered design with three ordinal groups. This function allows to estimate covariate-specific TCFs at multiple points for covariates.

Usage

clus_tcfs(out_clus_lme, newdata, thresholds, ap_var = FALSE)

Arguments

out_clus_lme

an object of class "clus_lme", a result of clus_lme call.

newdata

a data frame (containing specific value(s) of covariate(s)) in which to look for variables with which to estimate covariate-specific TCFs. In absence of covariate, no values have to be specified.

thresholds

a specified pair of thresholds.

ap_var

logical value. If set to TRUE, the variance-covariance matrix of estimated covariate-specific TCFs is estimated.

Details

This function implements a method in To et al. (2022) for estimating covariate-specific TCFs at a specified pair of thresholds of a continuous diagnostic test in a clustered design with three ordinal groups. The estimator is based on results from clus_lme, which uses the REML approach. The asymptotic variance-covariance matrix of the estimated covariate-specific TCFs is estimated through the Delta method. Note that, if the Box-Cox transformation is applied for the linear mixed-effect model, the pair of thresholds must be input in the original scale.

Before performing estimation, a check for the monotone ordering assumption is performed. This means that, for the fixed values of covariates, three predicted mean values for test results in three diagnostic groups are compared. If the assumption is not meet, the covariate-specific TCFs at the values of covariates are not estimated.

Value

TCFs returns an object of class "TCFs", which is a list containing at least the following components:

call

the matched call.

tcfs_est

a vector or matrix containing the estimated TCFs.

tcf_vcov

a matrix or list of matrices containing the estimated variance-covariance matrices.

thresholds

specified pair of thresholds.

mess_order

a diagnostic message from checking the monontone ordering.

newdata

value(s) of covariate(s).

n_p

total number of regressors in the model.

Generic functions such as print is also used to show the results.

References

To, D-K., Adimari, G., Chiogna, M. and Risso, D. (2022) “Receiver operating characteristic estimation and threshold selection criteria in three-class classification problems for clustered data”. Statistical Methods in Medical Research, 7, 31, 1325-1341.

Examples

data(data_3class)
## One covariate
out1 <- clus_lme(fixed_formula = Y ~ X1, name_class = "D",
                 name_clust = "id_Clus", data = data_3class)

### Estimate TCFs at one single value of X1, (t1, t2) = (1, 4)
out_tcfs_1 <- clus_tcfs(out_clus_lme = out1, newdata = data.frame(X1 = 1),
                        thresholds = c(1, 4), ap_var = TRUE)
print(out_tcfs_1)

## Two covariates
out2 <- clus_lme(fixed_formula = Y ~ X1 + X2, name_class = "D",
                 name_clust = "id_Clus", data = data_3class)

### Estimate covariate-specific TCFs at point (X1, X2) = (1, 0), and (t1, t2) = (1, 4)
out_tcfs_2 <- clus_tcfs(out_clus_lme = out2,
                        newdata = data.frame(X1 = 1, X2 = 0),
                        thresholds = c(1, 4), ap_var = TRUE)
print(out_tcfs_2)

### Estimate covariate-specific TCFs at three points and (t1, t2) = (1, 4)
out_tcfs_3 <- clus_tcfs(out_clus_lme = out2,
                        newdata = data.frame(X1 = c(-0.5, 0.5, 0.5),
                                             X2 = c(0, 0, 1)),
                        thresholds = c(1, 4), ap_var = TRUE)
print(out_tcfs_3)


[Package ClusROC version 1.0.2 Index]