This function summarizes recommendations for multicategory treatment setup from the results of binary treatment comparisons, using the majority voting approach.

summarize_rec(data, pred)

Arguments

data

a data frame containing the ID (ID), outcome (reward), and observed treatment (treatment) information of subjects.

pred

a matrix with K(K-1)/2 columns, where K is the total number of treatments. Each column is the recommendations between two treatments for all subjects.

Value

A data frame with the following 4 columns:

  • ID: IDs of subjects, same as those in data.

  • reward: outcome values of subjects, same as those in data.

  • treatment: observed treatments of subjects, same as those in data.

  • vote: recommended treatments of subjects that are summarized from pred using the majority voting approach.