Learn R Programming

riskscores (version 1.2.3)

get_score: Calculate Score from Risk Probability

Description

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

Usage

get_score(object, risk)

Value

Numeric vector with the same length as risk.

Arguments

object

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

risk

Numeric vector with probability value(s).

Examples

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

mod <- risk_mod(X, y)
get_score(mod, risk = c(0.25, 0.50, 0.75))

Run the code above in your browser using DataLab