boxcoxROC {trinROC} | R Documentation |
Box-Cox transformation on three-class ROC data
Description
A transformation function for three-class ROC data in order to obtain normally distributed classes.
Usage
boxcoxROC(
x,
y,
z,
lambda = seq(-2, 2, 0.05),
lambda2 = NULL,
eps = 0.02,
verbose = TRUE
)
Arguments
x , y , z |
vectors containing the data of the three classes "healthy", "intermediate" and "diseased" to be transformed. In two-class ROC analysis only. |
lambda |
vector of possible lambdas the log-likelihood function is evaluated. |
lambda2 |
numeric shifting parameter. For the implemented Box-Cox
transformation positive measurements in |
eps |
numeric; indicating the bandwith around zero, where |
verbose |
logical; indicating whether output should be displayed (default) or not. |
Details
A Box-Cox transformation computing
X^{(\lambda)} = \left\{ \begin{array}{ll} (X^\lambda -1)/\lambda, &
\mbox{if } \; \lambda \neq 0,\\ \log(X), & \mbox{else } \; \lambda = 0,
\end{array} \right.
with optimal \lambda
estimated from the likelihood kernel function,
as formally described in the supplementary
material in Bantis et al. (2017). If the data include any nonpositive
observations, a shifting parameter lambda2
can be included in the
transformation given by:
X^{(\lambda)} = \left\{ \begin{array}{ll} ((X+\lambda_2)^\lambda -1)/\lambda, & \mbox{if }
\, \lambda \neq 0,\\ \log(X+\lambda_2), & \mbox{else } \; \lambda = 0. \end{array}
\right.\\
Value
A list with components:
xbc , ybc , zbc |
The transformed vectors. |
lambda |
estimated optimal parameter. |
shapiro.p.value |
p-values obtained from |
References
Bantis LE, Nakas CT, Reiser B, Myall D and Dalrymple-Alford JC (2015) Construction of joint confidence regions for the optimal true class fractions of receiver operating characteristic (roc) surfaces and manifolds. Statistical Methods in Medical Research 26(3): 1429–1442.
Box, G. E. P. and Cox, D. R. (1964). An analysis of transformations (with discussion). Journal of the Royal Statistical Society, Series B, 26, 211–252.
See Also
shapiro.test
and boxcox
from the package MASS
.
Examples
data(cancer)
x1 <- with(cancer, cancer[trueClass=="healthy", 9])
y1 <- with(cancer, cancer[trueClass=="intermediate", 9])
z1 <- with(cancer, cancer[trueClass=="diseased", 9])
boxcoxROC(x1, y1, z1)