estimate_ATE_design_based_from_stats: Calculate ATE from block-level summary statistics.

View source: R/design_based_method.R

estimate_ATE_design_based_from_statsR Documentation

Calculate ATE from block-level summary statistics.

Description

This method is an implementation of the formula found in RCT-YES documentation.

Usage

estimate_ATE_design_based_from_stats(
  sum_tab,
  siteID = NULL,
  method = c("finite", "superpop", "superpop.original"),
  weight = c("individual", "site", "tx", "passed"),
  weight_col = NULL
)

Arguments

sum_tab

Table of summary statistics by block, from, e.g., 'block.data()'

siteID

Vector of site IDs if there are randomization blocks nested in site that should be aggregated (will change results for site weighting only).

method

finite, superpop, or superpop2 to give SEs that either capture uncertainty due to targeting a superpopulation quantity or not.

weight

Individual weight (i.e., number of individuals in each block), site weight (average site estimates, which will be considered block estimates if siteID is null), tx weight (i.e., number of treated individuals in each block), or "passed" (with weight_col being a string name of what column has the weights to use).

weight_col

Name of column that holds the weights to use for each block (NULL default).

Details

This can handle a superpopulation model, non-clustered but blocked.

Formula used is taken from page 83 of Shochet RCT-YES paper (eq 6.25). The ‘superpop' variant is a modification of the original ’superpop.original', pulling the weights from inside the squared term to outside. This method was suggested in personal correspondance with Schochet. If the weights are not all 1, this can make a difference.

Value

dataframe with calculated impacts and standard errors.


lmiratrix/blkvar documentation built on Nov. 18, 2024, 1:27 p.m.