optimal_intervention: Select optimal intervention

View source: R/evi.R

optimal_interventionR Documentation

Select optimal intervention

Description

Selects the intervention with the lowest expected loss.

Usage

optimal_intervention(loss_matrix)

Arguments

loss_matrix

Numeric matrix or data.frame of expected losses. Rows represent observational units and columns represent intervention options.

Value

A data.frame containing optimal action and minimum expected loss.

Examples

losses <- data.frame(
  no_action = c(10, 5, 2),
  monitor = c(8, 4, 3),
  review = c(7, 6, 4)
)
optimal_intervention(losses)

bewrs documentation built on June 24, 2026, 5:08 p.m.