lme2 {ClusROC}R Documentation

Linear Mixed-Effects Models for a continuous diagnostic test.

Description

lme2 fits the cluster-effect model for a continuous diagnostic test in a three-class setting as described in Xiong et al. (2018) and To et al. (2022).

Usage

lme2(
  fixed.formula,
  name.class,
  name.clust,
  data,
  levl.class = NULL,
  apVar = TRUE,
  boxcox = FALSE,
  interval_lambda = c(-2, 2),
  trace = TRUE,
  ...
)

Arguments

fixed.formula

a two-sided linear formula object, describing the fixed-effects part of the model for three classes, with the response on the left of ~ operator and the terms, separated by + operators, on the right. For example, Y ~ X1 + X2, Y ~ X1 + X2 + X1:X2 or log(Y) ~ X1 + X2 + I(X1^2).

name.class

name of variable indicating disease classes (or diagnostic groups) in the data.

name.clust

name of variable indicating clusters in the data.

data

a data frame containing the variables in the model.

levl.class

a vector (of strings) containing the ordered name chosen for the disease classes. The ordering is intended to be “increasing” with respect to the disease severity. If levl.class = NULL (default), the elements of the vector will be automatically determined from data, by considering the order of the means of the test values for each disease class (diagnostic group).

apVar

a logical value. Default = TRUE. If set to TRUE, the estimated covariance matrix for all estimated parameters in the model will be obtained (by using the sandwich formula).

boxcox

a logical value. Default = FALSE. If set to TRUE, a Box-Cox transformation will be applied to the model.

interval_lambda

a vector containing the end-points of the interval for searching the Box-Cox parameter, lambda. Default = (-2, 2).

trace

a logical value. Default = TRUE. If set to TRUE, the information about the check for the monotonic ordering of test values will be provided.

...

additional arguments for lme, such as control, contrasts.

Details

This function fits a linear mixed-effect model for a continuous diagnostic test in a three-class setting in order to account for the cluster and covariates effects on the test result. See Xiong et al. (2018) and To et al. (2022) for more details.

Value

lme2 returns an object of class "lme2" class, i.e., a list containing at least the following components:

call

the matched call.

est_para

a vector containing the estimated parameters.

se_para

a vector containing the standard errors.

vcov_sand

the estimated covariance matrix for all estimated parameters.

residual

a list of residuals.

fitted

a list of fitted values.

randf

a vector of estimated random effects for each cluster level.

n_coef

total number of coefficients included in the model.

n_p

total numbers of regressors in the model.

icc

an estimate of intra-class correlation - ICC

terms

the terms object used.

boxcox

logical value indicating whether the Box-Cox transformation was applied or not.

Generic functions such as print and plot are also used to show results of the fit.

References

Gurka, M. J., Edwards, L. J. , Muller, K. E., and Kupper, L. L. (2006) “Extending the Box-Cox transformation to the linear mixed model”. Journal of the Royal Statistical Society: Series A (Statistics in Society), 169, 2, 273-288.

Gurka, M. J. and Edwards, L. J. (2011) “Estimating variance components and random effects using the box-cox transformation in the linear mixed model”. Communications in Statistics - Theory and Methods, 40, 3, 515-531.

Kauermann, G. and Carroll, R. J. (2001) “A note on the efficiency of sandwich covariance matrix estimation”. Journal of the American Statistical Association, 96, 456, 1387-1396.

Liang, K. Y. and Zeger, S. L. (1986) “Longitudinal data analysis using generalized linear models”. Biometrika, 73, 1, 13-22.

Mancl, L. A. and DeRouen, T. A. (2001) “A covariance estimator for GEE with improved small-sample properties”. Biometrics, 57, 1, 126-134.

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, DOI: 10.1177/09622802221089029.

Xiong, C., Luo, J., Chen L., Gao, F., Liu, J., Wang, G., Bateman, R. and Morris, J. C. (2018) “Estimating diagnostic accuracy for clustered ordinal diagnostic groups in the three-class case – Application to the early diagnosis of Alzheimer disease”. Statistical Methods in Medical Research, 27, 3, 701-714.

Examples

## Example 1:
data(data_3class)
head(data_3class)
## A model with two covariate: X1 + X2
out1 <- lme2(fixed.formula = Y ~ X1 + X2, name.class = "D", name.clust = "id_Clus",
             data = data_3class)
print(out1)
plot(out1)


## Example 2: Box-Cox transformation
data(data_3class_bcx)
out2 <- lme2(fixed.formula = Y ~ X, name.class = "D", name.clust = "id_Clus",
             data = data_3class_bcx, boxcox = TRUE)
print(out2)
plot(out2)



[Package ClusROC version 1.0.1 Index]