Title: | Estimating the Minimal Clinically Important Difference |
---|---|
Description: | Apply the marginal classification method to achieve the purpose of providing the point and interval estimates for the minimal clinically important difference based on the classical anchor-based method. For more details of the methodology, please see Zehua Zhou, Leslie J. Bisson and Jiwei Zhao (2021) <arXiv:2108.11589>. |
Authors: | Zehua Zhou [cre, aut], Jiwei Zhao [aut] |
Maintainer: | Zehua Zhou <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.0 |
Built: | 2024-10-31 22:23:13 UTC |
Source: | CRAN |
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
cv.imcid(x, y, z, lamseq, delseq, k = 5, maxit = 100, tol = 0.01)
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 |
delseq |
a vector containing the candidate values for the tuning parameter |
k |
the number of groups into which the data should be split to select the tuning parameter |
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
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'
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'
cv.pmcid
returns the optimal tuning parameter selected from a given grid by using k-fold cross-validation.
The tuning parameter is selected for determining the MCID at the population level
cv.pmcid(x, y, delseq, k = 5, maxit = 100, tol = 0.01)
cv.pmcid(x, y, delseq, k = 5, maxit = 100, tol = 0.01)
x |
a continuous variable denoting the outcome change of interest |
y |
a binary variable indicating the patient-reported outcome derived from the anchor question |
delseq |
a vector containing the candidate values for the tuning parameter |
k |
the number of groups into which the data should be split to select the tuning parameter |
maxit |
the maximum number of iterations. Defaults to 100 |
tol |
the convergence tolerance. Defaults to 0.01 |
a list including the selected tuning parameter and the value of the corresponding target function
n <- 500 deltaseq <- seq(0.1, 1, 0.1) a <- 0.2 b <- -0.1 p <- 0.5 set.seed(115) y <- 2 * rbinom(n, 1, p) - 1 y_1 <- which(y == 1) y_0 <- which(y == -1) x <- c() x[y_1] <- rnorm(length(y_1), a, 0.1) x[y_0] <- rnorm(length(y_0), b, 0.1) sel <- cv.pmcid(x = x, y = y, delseq = deltaseq, k = 5, maxit = 100, tol = 1e-02) sel$'Selected delta' sel$'Function value'
n <- 500 deltaseq <- seq(0.1, 1, 0.1) a <- 0.2 b <- -0.1 p <- 0.5 set.seed(115) y <- 2 * rbinom(n, 1, p) - 1 y_1 <- which(y == 1) y_0 <- which(y == -1) x <- c() x[y_1] <- rnorm(length(y_1), a, 0.1) x[y_0] <- rnorm(length(y_0), b, 0.1) sel <- cv.pmcid(x = x, y = y, delseq = deltaseq, k = 5, maxit = 100, tol = 1e-02) sel$'Selected delta' sel$'Function value'
We formulate the individualized MCID as a linear function of the patients' clinical profiles. imcid
returns the point estimate for the linear coefficients of the MCID at the individual level
imcid(x, y, z, n, lambda, delta, maxit = 100, tol = 0.01, alpha = 0.05)
imcid(x, y, z, n, lambda, delta, maxit = 100, tol = 0.01, alpha = 0.05)
x |
a continuous variable denoting the outcome change of interest |
y |
a binary variable indicating the patient-reported outcome derived from the anchor question |
z |
a vector or matrix denoting the patient's clinical profiles |
n |
the sample size |
lambda |
the selected tuning parameter |
delta |
the selected tuning parameter |
maxit |
the maximum number of iterations. Defaults to 100 |
tol |
the convergence tolerance. Defaults to 0.01 |
alpha |
nominal level of the confidence interval. Defaults to 0.05 |
a list including the point estimates for the linear coefficients of the individualized MCID and their standard errors, and the corresponding confidence intervals based on the asymptotic normality
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 ### True linear coefficients of the individualized MCID: ### ### beta0=0, beta1=0.5 ### set.seed(115) 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) lamsel <- sel$'Selected lambda' delsel <- sel$'Selected delta' result <- imcid(x = x, y = y, z = z, n = n, lambda = lamsel, delta = delsel, maxit = 100, tol = 1e-02, alpha = 0.05) result$'Point estimates' result$'Standard errors' result$'Confidence intervals'
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 ### True linear coefficients of the individualized MCID: ### ### beta0=0, beta1=0.5 ### set.seed(115) 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) lamsel <- sel$'Selected lambda' delsel <- sel$'Selected delta' result <- imcid(x = x, y = y, z = z, n = n, lambda = lamsel, delta = delsel, maxit = 100, tol = 1e-02, alpha = 0.05) result$'Point estimates' result$'Standard errors' result$'Confidence intervals'
pmcid
returns the point estimate for the MCID at the population level
pmcid(x, y, n, delta, maxit = 100, tol = 0.01, alpha = 0.05)
pmcid(x, y, n, delta, maxit = 100, tol = 0.01, alpha = 0.05)
x |
a continuous variable denoting the outcome change of interest |
y |
a binary variable indicating the patient-reported outcome derived from the anchor question |
n |
the sample size |
delta |
the selected tuning parameter |
maxit |
the maximum number of iterations. Defaults to 100 |
tol |
the convergence tolerance. Defaults to 0.01 |
alpha |
nominal level of the confidence interval. Defaults to 0.05 |
a list including the point estimate of the population MCID and its standard error, and the confidence interval based on the asymptotic normality
n <- 500 deltaseq <- seq(0.1, 1, 0.1) a <- 0.2 b <- -0.1 p <- 0.5 ### True MCID is 0.5 ### set.seed(115) y <- 2 * rbinom(n, 1, p) - 1 y_1 <- which(y == 1) y_0 <- which(y == -1) x <- c() x[y_1] <- rnorm(length(y_1), a, 0.1) x[y_0] <- rnorm(length(y_0), b, 0.1) sel <- cv.pmcid(x = x, y = y, delseq = deltaseq, k = 5, maxit = 100, tol = 1e-02) delsel <- sel$'Selected delta' result <- pmcid(x = x, y = y, n = n, delta = delsel, maxit = 100, tol = 1e-02, alpha = 0.05) result$'Point estimate' result$'Standard error' result$'Confidence interval'
n <- 500 deltaseq <- seq(0.1, 1, 0.1) a <- 0.2 b <- -0.1 p <- 0.5 ### True MCID is 0.5 ### set.seed(115) y <- 2 * rbinom(n, 1, p) - 1 y_1 <- which(y == 1) y_0 <- which(y == -1) x <- c() x[y_1] <- rnorm(length(y_1), a, 0.1) x[y_0] <- rnorm(length(y_0), b, 0.1) sel <- cv.pmcid(x = x, y = y, delseq = deltaseq, k = 5, maxit = 100, tol = 1e-02) delsel <- sel$'Selected delta' result <- pmcid(x = x, y = y, n = n, delta = delsel, maxit = 100, tol = 1e-02, alpha = 0.05) result$'Point estimate' result$'Standard error' result$'Confidence interval'