# cv.pmcid: Selection of the tuning parameter for determining the MCID at... In MCID: Estimating the Minimal Clinically Important Difference

## Description

`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

## Usage

 `1` ```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 δ, 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

## Value

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

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18``` ```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' ```

MCID documentation built on Sept. 10, 2021, 5:07 p.m.