evaluate$risk.strata

Risk-strata evaluation for PRS models

Description

evaluate$risk.strata() summarizes outcome behavior across PRS-defined quantile strata.

Usage

evaluate$risk.strata(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, quantiles = c(0.2, 0.8), reference = "lowest", conf.level = 0.95)

Arguments

models

Optional model specification.

on

Evaluation context (PolyGeniusData or genotype input). When genotype input is supplied, PolyGenius internally materializes a temporary PolyGeniusData object to resolve and evaluate scores.

outcome

Outcome definition.

  • When on is PolyGeniusData: unquoted expression resolved on observations.

  • When on is genotype input: vector of length n_obs, list of vectors (each length n_obs), or table with one or more columns and nrow == n_obs.

type

Outcome type (“auto”, “binary”, “continuous”, “survival”).

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. If on is a PolyGeniusData object, computed scores are written into that object. If on is genotype input, computed scores exist only in the temporary internal evaluation data object and are not returned.

score.args

Named list passed to compute$scores(…) when needed.

metrics

Optional metric subset; defaults by outcome type when NULL.

quantiles

Numeric cut points in ⁠(0,1)⁠ used to define risk groups.

reference

Reference group for relative-effect metrics. “lowest” uses the lowest stratum.

conf.level

Confidence level for interval estimates.

logger

Optional logger to pass and use within the function. Defaults NULL - creates a new logger

Value

A PolyGeniusEvaluation object only. Any temporary PolyGeniusData constructed from genotype input is not returned. Risk-strata artifacts are available via slotArtifacts(), including strata.profile: one row per evaluated observation after assigning each score to a quantile-defined stratum, with evaluation.outcome, model, model.idx, stratum, score, and outcome; survival outcomes add time. This artifact is the observation-level substrate used for lift and stratum-profile visualizations. Risk-strata diagnostics are available via slotDiagnostics(), including metric.flags for muffled model-fit warnings in relative-effect metrics.

See Also

Other evaluate: evaluate.benchmark(), evaluate.calibration(), evaluate.compare(), evaluate.discrimination(), evaluate.incremental(), evaluate.similarity()