cvWtTuning {ClinicalUtilityRecal}R Documentation

Cross-validation for Selecting Weight Tuning Parameter

Description

Calibration weights require specification of tuning parameter delta or lambda. This function uses K-fold cross-validation to select tuning parameter used for calibration weights, with standardized net benfeit (sNB) as objective function. Either one of delta or lambda must be specificed. The sequence of tuning parameters can be obtained from the RAWgrid function.

Usage

cvWtTuning(p,y,r,rl,ru,kFold=5,cvParm,tuneSeq,cv.seed=1111)

Arguments

y

Vector of binary outcomes, with 1 indicating event (cases) and 0 indicating no event (controls)

p

Vector of risk score values

r

Clinically relevant risk threshold

rl

Lower bound of clinically relevant region

ru

Upper bound of clinically relevant region

kFold

Number of folds for cross-validation

cvParm

Parameter to be selected via cross-validation. Can be either delta the weight assigned to observations outside the clinically relevant region [R_l,R_u], or the lambda tuning parameter controlling exponential decay within the clinically relevant region [R_l,R_u]

tuneSeq

Sequence of values of tuning parameters to perform cross-validation over

cv.seed

Intial seed set for random splitting of data into K folds

Value

cv.res

Matrix containing sequence of tuning parameters and corresponding cross-validation sNB

cv.param

Value of tuning parameter selected via cross validation

cv.full

Matrix of cross-validation results for all folds

Note

Note this function does not split data into training and validaion set, but performs the K-fold cross-validation procedure on all data included. We advise that a separate, validation subset should be split from the data used in this function.

Author(s)

Anu Mishra

References

Mishra, A. (2019). Methods for Risk Markers that Incorporate Clinical Utility (Doctoral dissertation). (Available Upon Request)

See Also

calWt, RAWgrid, nb, cvRepWtTuning


[Package ClinicalUtilityRecal version 0.1.0 Index]