View source: R/adaptive_utils.R
aw_estimate | R Documentation |
Estimates the value of a policy based on AIPW scores and a policy matrix using non-contextual
adaptive weighting. If evalwts
is not provided, uses equal weights for all observations.
aw_estimate(scores, policy, evalwts = NULL)
scores |
Numeric matrix. AIPW scores, shape |
policy |
Numeric matrix. Policy matrix |
evalwts |
Optional numeric vector. Non-contextual adaptive weights |
Numeric scalar. Estimated policy value.
scores <- matrix(c(0.5, 0.8, 0.6,
0.3, 0.9, 0.2,
0.5, 0.7, 0.4,
0.8, 0.2, 0.6), ncol = 3, byrow = TRUE)
policy <- matrix(c(0.2, 0.3, 0.5,
0.6, 0.1, 0.3,
0.4, 0.5, 0.1,
0.2, 0.7, 0.1), ncol = 3, byrow = TRUE)
aw_estimate(scores = scores, policy = policy, evalwts = c(0.5, 1, 0.5, 1.5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.