get_subgroup_results {BioPred}R Documentation

Get Subgroup Results

Description

This function predicts the treatment assignment for each patient based on a cutoff value.

Usage

get_subgroup_results(model, X_feature, subgroup_label = NULL, cutoff = 0.5)

Arguments

model

The trained XGBoost-based subgroup model.

X_feature

The data matrix containing patient features.

subgroup_label

(Optional) The subgroup labels. In real-world data, this information is typically unknown and only available in simulated data. If provided, the prediction accuracy will also be returned.

cutoff

The cutoff value for treatment assignment, defaulted to 0.5.

Value

A data frame containing each subject and assigned treatment (1 for treatment, 0 for control). If subgroup labels are provided, it also returns the prediction accuracy of the subgroup labels.


[Package BioPred version 1.0.1 Index]