View source: R/compare_methods_oracle.R
calc_summary_stats_oracle | R Documentation |
Function that returns a summary of block level true values for simulations (so works with full schedule of potential outcomes).
calc_summary_stats_oracle(Y0, Y1, B, data = NULL, p_mat = NULL, Z = NULL)
Y0 |
Vector of control potential outcomes (or name of column in data holding same). |
Y1 |
Vector of treatment potential outcomes (or name of column in data holding same). |
B |
block ids (or name of column in data holding same). |
data |
alternatively is matrix of Y,Z,B |
p_mat |
Data.frame with exactly two columns, and one row per block. First column is the categorical covariate denoting blocks, with same levels as in B, above. Second column is proportion treated in that block. |
Z |
Instead of passing pre-computed p_mat, one can pass an example treatment assignment vector Z of 0s and 1s. In this case method will tabulate to generate p_mat. p_mat or Z must be null to avoid ambiguity. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.