Description Usage Arguments Value Examples
cv.imcid
returns the optimal tuning parameter δ and λ selected from a given grid by using k-fold cross-validation.
The tuning parameters are selected for determining the MCID at the individual level
1 | cv.imcid(x, y, z, lamseq, delseq, k = 5, maxit = 100, tol = 0.01)
|
x |
a continuous variable denoting the outcome change of interest |
y |
a binary variable denoting the patient-reported outcome derived from the anchor question |
z |
a vector or matrix denoting the patient's clinical profiles |
lamseq |
a vector containing the candidate values for the tuning parameter λ, where λ is the coefficient of the penalty term, used for avoiding the issue of model overfitting |
delseq |
a vector containing the candidate values for the tuning parameter δ, where δ is used to control the difference between the 0-1 loss and the surrogate loss. We recommend selecting the possible values from the neighborhood of the standard deviation of x |
k |
the number of groups into which the data should be split to select the tuning parameter δ by cross-validation. Defaults to 5 |
maxit |
the maximum number of iterations. Defaults to 100 |
tol |
the convergence tolerance. Defaults to 0.01 |
a list including the combinations of the selected tuning parameters and the value of the corresponding target function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | n <- 500
lambdaseq <- 10 ^ seq(-3, 3, 0.1)
deltaseq <- seq(0.1, 0.3, 0.1)
a <- 0.1
b <- 0.55
c <- -0.1
d <- 0.45
set.seed(721)
p <- 0.5
y <- 2 * rbinom(n, 1, p) - 1
z <- rnorm(n, 1, 0.1)
y_1 <- which(y == 1)
y_0 <- which(y == -1)
x <- c()
x[y_1] <- a + z[y_1] * b + rnorm(length(y_1), 0, 0.1)
x[y_0] <- c + z[y_0] * d + rnorm(length(y_0), 0, 0.1)
sel <- cv.imcid(x = x, y = y, z = z, lamseq = lambdaseq,
delseq = deltaseq, k = 5, maxit = 100, tol = 1e-02)
sel$'Selected lambda'
sel$'Selected delta'
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.