table_rand_pvals {optrefine}R Documentation

Generate a covariate balance table from the empirical randomization null distribution

Description

Generate a table using the information collected in rand_pvals(). See rand_pvals() for more details about the methods used.

Usage

table_rand_pvals(
  object = NULL,
  z = NULL,
  X = NULL,
  base_strata = NULL,
  refined_strata = NULL,
  options = list()
)

Arguments

object

an optional object of class strat, typically created using strat() or as a result of a call to prop_strat() or refine(). If not provided, z and X must be specified

z

vector of treatment assignment; only used if object is not supplied

X

covariate matrix/data.frame; only used if object is not supplied

base_strata

optional initial stratification for which to calculate the empirical randomization null distribution; only used if object is not supplied

refined_strata

optional refined stratification for which to calculate the empirical randomization null distribution; only used if object is not supplied

options

list of additional options, listed in the details below

Details

The options list argument can contain any of the following elements:

Value

Matrix with 4 or 8 columns, depending whether one or both of base and refined strata are provided and the incl_base option. The columns give the observed standardized mean difference or objective value, the median and maximum across nrand null simulations, and the P-value which is the proportion of the null simulations that have worse covariate balance than the observed value. The top three rows give the scaled objective value and the average and maximum standardized mean differences across all strata and covariates. The following rows, one for each covariate, give the standardized mean difference for that covariate, averaged across strata. The first row for the scaled objective value is NULL for the base stratification, if included, as the base stratification does not generally minimize a mathematical objective function.


[Package optrefine version 1.1.0 Index]