‘MCID’ is an R package used to provide the point and interval estimation on the minimal clinically important difference (MCID) at the population and individual level. For population level, it produces a constant value for the estimation of MCID. For individual level, the MCID is defined as a linear function of patient’s clinical characteristics, and the estimated linear coefficients can be obtained.
You can install the released version of MCID from GitHub with:
# install.packages("devtools")
::install_github("zzhou0721/MCID") devtools
rm(list = ls())
library(MCID)
#> Welcome to MCID package
<- 500
n <- 10 ^ seq(-3, 3, 0.1)
lambdaseq <- seq(0.1, 0.3, 0.1)
deltaseq <- 0.1
a <- 0.55
b <- -0.1
c <- 0.45
d
set.seed(115)
<- 0.5
p <- 2 * rbinom(n, 1, p) - 1
y <- rnorm(n, 1, 0.1)
z <- which(y == 1)
y_1 <- which(y == -1)
y_0 <- c()
x <- a + z[y_1] * b + rnorm(length(y_1), 0, 0.1)
x[y_1] <- c + z[y_0] * d + rnorm(length(y_0), 0, 0.1) x[y_0]
To determine MCID at the populaton level, we first need to select an optimal value for the tuning parameter δ, which is used to control the difference between 0-1 loss and surrogate loss.
<- cv.pmcid(x = x, y = y, delseq = deltaseq,
sel k = 5, maxit = 100, tol = 1e-02)
<- sel$'Selected delta'
delsel
delsel#> [1] 0.1
Then with selected optimal value of δ, we can determine the point and interval estimation of MCID at the population level. The confidence interval is constructed based on the asymptotic normality. In our simulated data, the true population MCID is 0.5.
<- pmcid(x = x, y = y, n = n, delta = delsel,
result maxit = 100, tol = 1e-02, alpha = 0.05)
$'Point estimate'
result#> [1] 0.4961217
$'Standard error'
result#> [1] 0.0101217
$'Confidence interval'
result#> [1] 0.4762836 0.5159599
To determine MCID at the individual level, we first need to select a combination of the optimal values for the tuning parameters δ and λ. δ is used to control the difference between 0-1 loss and surrogate loss. λ is the coefficient of the penalty term used to avoid the overfitting issue.
<- cv.imcid(x = x, y = y, z = z, lamseq = lambdaseq,
sel delseq = deltaseq, k = 5, maxit = 100, tol = 1e-02)
<- sel$'Selected lambda'
lamsel <- sel$'Selected delta'
delsel
lamsel#> [1] 0.004496472
delsel#> [1] 0.2
Then with selected δ and λ, we can determine the point and interval estimation for the linear coefficients of the individualized MCID function. The confidence intervals are constructed based on the asymptotic normalities. In our simulated data, the true linear coefficients of the individualized MCID are β0 = 0 and β1 = 0.5
<- imcid(x = x, y = y, z = z, n = n, lambda = lamsel,
result delta = delsel, maxit = 100, tol = 1e-02, alpha = 0.05)
$'Point estimates'
result#> [,1]
#> beta0 -0.01551779
#> beta1 0.51193914
$'Standard errors'
result#> [,1]
#> beta0 0.1292652
#> beta1 0.1227669
$'Confidence intervals'
result#> Lower bound Upper bound
#> beta0 -0.2688728 0.2378373
#> beta1 0.2713205 0.7525577