evaluate$discrimination
Discrimination metrics for PRS models
Description
evaluate$discrimination() quantifies how well one or more PRS models separate observations with different outcome values.
The API is model-centric:
-
modelsdefines what to evaluate. -
ondefines where to evaluate (a cohort context).
on may be:
-
a
PolyGeniusDataobject, or -
one or more
GenotypeInfoobjects (which are converted to a temporaryPolyGeniusDatausing the suppliedmodels).
Usage
`evaluate$discrimination`(models = NULL, on, outcome, type = c("auto", "binary", "continuous", "survival"), time = NULL, event = NULL, obs = NULL, scores.layer = X, score.mode = c("compute.if.missing", "require", "recompute"), score.args = list(), metrics = NULL, bootstrap = 2000, conf.level = 0.95)
Arguments
models
|
Optional model specification. Supported forms:
|
on
|
Evaluation context: |
outcome
|
Outcome definition.
|
type
|
Outcome type. One of |
time
|
Unquoted time-to-event expression (required for survival). |
event
|
Unquoted event-indicator expression (required for survival). |
obs
|
Optional unquoted observation subset expression. |
scores.layer
|
Score layer to read/use (symbol or single string). |
score.mode
|
Score resolution mode:
|
score.args
|
Named list passed to |
metrics
|
Optional metric subset. If |
bootstrap
|
Number of bootstrap replicates used for AUC and PR-AUC confidence intervals (binary outcomes). |
conf.level
|
Confidence level for interval estimates. |
logger
|
Optional logger to pass and use within the function. Defaults |
Value
A PolyGeniusEvaluation object only. Any temporary PolyGeniusData constructed from genotype input is not returned. Discrimination artifacts are available via slotArtifacts():
-
scoresfor all outcome types: one row per evaluated observation and model withmodel,model.idx,obs.idx,score,outcome, andoutcome.value; survival outcomes addtime. -
confusionfor binary outcomes: one row per threshold withtp,fp,tn,fn, plus derived columns such assensitivity,specificity,precision,npv,accuracy,recall,tpr, andfpr. For continuous outcomes, undefinedpearson.rvalues (for example due to zero variance) are returned asNAand flagged inslotDiagnostics(x, “metric.flags”).
See Also
Other evaluate: evaluate.benchmark(), evaluate.calibration(), evaluate.compare(), evaluate.incremental(), evaluate.risk.strata(), evaluate.similarity()