This function calculates the empirical value functions as
defined in equation (8)
in Section 2.2
of the manuscript.
evf(data, pred, propensity)
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. |
propensity |
a data frame with K columns, where K is the total number
of treatments. The k th column is the propensity scores of assigning
the k th treatment to subjects. |
Value
A scalar as defined in equation (8)
in Section 2.2
of
the manuscript.