estimate_ATE_design_based: Implementation of the formula found in RCT-YES documentation.

View source: R/design_based_method.R

estimate_ATE_design_basedR Documentation

Implementation of the formula found in RCT-YES documentation.

Description

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

Usage

estimate_ATE_design_based(
  formula,
  control_formula = NULL,
  data,
  siteID = NULL,
  method = c("finite", "superpop", "superpop.original"),
  weight = c("individual", "site", "tx")
)

estimate_ATE_design_based_adjusted(
  formula,
  control_formula,
  data,
  siteID = NULL,
  method = c("finite", "superpop", "superpop.adj"),
  weight = c("individual", "site", "tx")
)

Arguments

formula

Input formula for analysis

control_formula

What variables to control for, in the form of "~ X1 + X2".

data

Dataframe with defined Yobs, Z, and B variables.

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.

Details

Taken from page 83 of Shochet RCT-YES paper (eq 6.25).

The adjusted version, i.e., if control formula is passed, also uses formula from the Schochet RCT Yes technical document.

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.

Functions

  • estimate_ATE_design_based_adjusted(): This directly implements the adjusted. The main method will dispatch to this one if control_formula is not NULL.


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