plot.risk_mod {riskscores}R 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)

[Package riskscores version 1.1.1 Index]