Package 'MCID'

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

Help Index


Selection of the tuning parameters for determining the MCID at the individual level

Description

cv.imcid returns the optimal tuning parameter δ\delta and λ\lambda selected from a given grid by using k-fold cross-validation. The tuning parameters are selected for determining the MCID at the individual level

Usage

cv.imcid(x, y, z, lamseq, delseq, k = 5, maxit = 100, tol = 0.01)

Arguments

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 λ\lambda, where λ\lambda 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 δ\delta, where δ\delta 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 δ\delta by cross-validation. Defaults to 5

maxit

the maximum number of iterations. Defaults to 100

tol

the convergence tolerance. Defaults to 0.01

Value

a list including the combinations of the selected tuning parameters and the value of the corresponding target function

Examples

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'

Selection of the tuning parameter for determining the MCID at the population level

Description

cv.pmcid returns the optimal tuning parameter δ\delta selected from a given grid by using k-fold cross-validation. The tuning parameter is selected for determining the MCID at the population level

Usage

cv.pmcid(x, y, delseq, k = 5, maxit = 100, tol = 0.01)

Arguments

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 δ\delta, where δ\delta 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 δ\delta by cross-validation. Defaults to 5

maxit

the maximum number of iterations. Defaults to 100

tol

the convergence tolerance. Defaults to 0.01

Value

a list including the selected tuning parameter and the value of the corresponding target function

Examples

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'

Point and interval estimation for the MCID at the individual level

Description

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

Usage

imcid(x, y, z, n, lambda, delta, maxit = 100, tol = 0.01, alpha = 0.05)

Arguments

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 λ\lambda, can be returned by cv.imcid

delta

the selected tuning parameter δ\delta, can be returned by cv.imcid

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

Value

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

Examples

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'

Point and interval estimation for the MCID at the population level

Description

pmcid returns the point estimate for the MCID at the population level

Usage

pmcid(x, y, n, delta, maxit = 100, tol = 0.01, alpha = 0.05)

Arguments

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 δ\delta, can be returned by cv.pmcid

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

Value

a list including the point estimate of the population MCID and its standard error, and the confidence interval based on the asymptotic normality

Examples

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'