View source: R/design_based_method.R
estimate_ATE_design_based_from_stats | R Documentation |
This method is an implementation of the formula found in RCT-YES documentation.
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
)
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). |
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.
dataframe with calculated impacts and standard errors.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.