boxcoxROC | R Documentation |
A transformation function for three-class ROC data in order to obtain normally distributed classes.
boxcoxROC( x, y, z, lambda = seq(-2, 2, 0.05), lambda2 = NULL, eps = 0.02, verbose = TRUE )
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. |
A Box-Cox transformation computing
X^{(λ)} = log(X) if λ = 0 and X^{(λ)} = (X^λ -1)/λ otherwise
with optimal λ 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^{(λ)} = log(X+λ_2), if λ = 0 and X^{(λ)} = ((X+λ_2)^λ -1)/λ otherwise.
A list with components:
xbc, ybc, zbc |
The transformed vectors. |
lambda |
estimated optimal parameter. |
shapiro.p.value |
p-values obtained from |
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.
shapiro.test
and boxcox
from the package MASS
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.