PolyGenius
Contents

visualize$evaluate$profile

Evaluation profile plot

Plots an evaluate$profile() result: one row per model, one column per metric, each point the stored estimate with its interval where one exists.

Usage

visualize.evaluate.profile(
  results,
  metrics = NULL,
  group.by = NULL,
  grid = TRUE,
  palette = NULL,
  theme = c("polygenius", "none")
)

Arguments

ArgumentDescription
resultsA [PolyGeniusEvaluation](/reference/polygeniusevaluation/), typically from [evaluate$profile()](/reference/evaluate-profile/). Anything else aborts.
metricsThe ranking metrics, passed to [evaluate$select()](/reference/evaluate-select/), which lists the forms and the default.
group.byNULL (default), a named character vector mapping model to group, such as c(m1 = "LDpred2", m2 = "PRS-CS"), or a two-column table of model and group, in that order. Every model in results needs a group. Models the mapping names beyond those are ignored.
gridLogical, default TRUE. Draws a soft horizontal gridline at each model row, so a row can be read across the columns.
paletteA single colour, such as "darkorchid4", or NULL (default) for the package ink. Draws the points, intervals, lollipops and the fill of tied models. Anything else aborts.
themeOne of "polygenius" (default), "none". Plot theme. "none" gives a bare theme_minimal() to style yourself; palette colors are applied either way.

Value

A ggplot object.

Details

Only stratum == "all" rows are drawn. The columns for a binary outcome are AUC, \DeltaAUC, \Delta liability R^2, the association odds ratio, the stratification odds ratio of the extreme bands, the score correlation with the top model, and the composite score. A continuous outcome takes R^2, \Delta R^2, beta and the band mean difference in their place. A column without rows is left out, so there are no incremental columns without covariates and no correlation with one model.

Each column is titled by its analysis and labelled below by its metric. Each quantity is one column across outcomes. The stratification column contrasts the highest and the lowest band, whichever is not the reference, with the reference band. The two bands share the column, drawn as an upward and a downward triangle a little apart on the model's row, and the shape legend names each contrast. The correlation column reads the redundancy score.pearson rows pairing each model with the top model, in either orientation. The top model itself has no point there. When there is a correlation column, the caption names each outcome's top model.

The composite score, the rank and tied come from evaluate$select() with metrics, so the top model is select's first rank-1 model. The composite score is drawn as a lollipop from 0. A model's points are filled when tied is TRUE and hollow otherwise, NA included. tied needs compare rows against the top model; without them only the top is filled.

Models are sorted by composite score, best at the top, with an NA score last. With group.by, each group is a row of panels, models are sorted within it, and groups are ordered by their best model. With several outcomes, each outcome is a row of panels with its own ranking and its own group order.

Examples

ev <- evaluate$profile(study, outcomes = diagnosis, covariates = c(age, sex))
visualize$evaluate$profile(ev)
visualize$evaluate$profile(ev, group.by = c(m1 = "LDpred2", m2 = "LDpred2", m3 = "PRS-CS"))

See Also

Aliases: visualize.evaluate.profile, visualize$evaluate$profile, visualize_evaluate_profile