plot.risk_mod: Plot Risk Score Model Curve

View source: R/generic.R

plot.risk_modR Documentation

Plot Risk Score Model Curve

Description

Plots the linear regression equation associated with the integer risk score model. Plots the scores on the x-axis and risk on the y-axis.

Usage

## S3 method for class 'risk_mod'
plot(x, score_min = NULL, score_max = NULL, ...)

Arguments

x

An object of class "risk_mod", usually a result of a call to risk_mod().

score_min

The minimum score displayed on the x-axis. The default is the minimum score predicted from model's training data.

score_max

The maximum score displayed on the x-axis. The default is the maximum score predicted from model's training data.

...

Additional arguments affecting the plot produced

Value

Object of class "ggplot".

Examples

y <- breastcancer[[1]]
X <- as.matrix(breastcancer[,2:ncol(breastcancer)])
mod <- risk_mod(X, y, lambda0 = 0.01)

plot(mod)

riskscores documentation built on June 8, 2025, 10:27 a.m.