Description Usage Arguments Value Warning Author(s) References See Also Examples
View source: R/proj2_wtRecal.R
Tuning parameters for calibration weights may not be intutitive. Instead, relative average weight (RAW) can be used to find sensible tuning parameters. The RAW is the average weight of observations within the RAW region, [R_{l,RAW},R_{u,RAW}], divided by the average weight of observations outside RAW region.
This function elicits a grid of tuning parameter lambda or delta given a sequence of relative average weights (RAW) values, to be used for cross-validation. One tuning parameter delta or lambda must be specified.
Two clinically relevant lower and upper bound values must be specified. The first, [R_{l},R_{u}, define the clinically relevant region used for the weighting function. The second, [R_{l,RAW},R_{u,RAW}], define the complemenatry regions used for defining relative average weights.
1 2 |
r |
Clinically relevant risk threshold |
rl |
Lower bound of clinically relevant region |
ru |
Upper bound of clinically relevant region |
p |
Vector of risk score values |
y |
Vector of binary outcomes, with 1 indicating event (cases) and 0 indicating no event (controls) |
rawSeq |
Sequence of relative average weights |
cvParm |
Tuning parameter that will be selected via cross-validation. Can either be lambda or delta |
delta |
Calibration weight for observations outside clinically relevant region [R_l,R_u]. Needs to be specified if cvParm="lambda", otherwise should be left blank, and function will generate a sequence of delta for cross-validaton. |
lambda |
Tuning parameter for controlling exponential decay of calibration weights. Needs to be specified if cvParm="delta", otherwise should be left blank, and function will generate a sequence of lambda for cross-validaton. |
rl.raw |
Lower bound for defining the relative average weight region of interest |
ru.raw |
Upper bound for defining the relative average weight region of interest |
rrWt.seq |
Matrix containing the input RAW sequence, and corresponding weight tuning parameter lambda and weight value delta (with one fixed depending on cvParm selection). If 'NA' is returned there may be too few events within the weight clinically relevant RAW region, meaning that RAW value is not possible |
Event rate outside RAW interval, widen RAW intervalIf no or too cases are inside RAW interval [R_l,R_u], cross-validation procedure may not be stable, so this warning indicates RAW interval should widen to include more cases.
Anu Mishra
Mishra, A. (2019). Methods for Risk Markers that Incorporate Clinical Utility (Doctoral dissertation). (Available Upon Request)
calWt
,
cvWtTuning
,
cvRepWtTuning
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.