get_risk: Calculate Risk Probability from Score

View source: R/helpers.R

get_riskR Documentation

Calculate Risk Probability from Score

Description

Returns the risk probabilities for the provided score value(s).

Usage

get_risk(object, score)

Arguments

object

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

score

Numeric vector with score value(s).

Value

Numeric vector with the same length as score.

Examples

y <- breastcancer[[1]]
X <- as.matrix(breastcancer[,2:ncol(breastcancer)])

mod <- risk_mod(X, y)
get_risk(mod, score = c(1, 10, 20))


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