calc_summary_stats_oracle: Make table of data for simulations

View source: R/compare_methods_oracle.R

calc_summary_stats_oracleR Documentation

Make table of data for simulations

Description

Function that returns a summary of block level true values for simulations (so works with full schedule of potential outcomes).

Usage

calc_summary_stats_oracle(Y0, Y1, B, data = NULL, p_mat = NULL, Z = NULL)

Arguments

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.


lmiratrix/blkvar documentation built on April 30, 2024, 7:26 p.m.