compare_methods: Compare different estimators for multisite/blocked RCTs.

View source: R/compare_methods.R

compare_methodsR Documentation

Compare different estimators for multisite/blocked RCTs.

Description

This function calculates the point estimates and SE estimates for a variety of blocked designs implemented by this package. It is a wrapper for the many other individual methods available, and returns things in a tidy table.

Usage

compare_methods(
  Yobs,
  Z,
  B,
  siteID = NULL,
  data = NULL,
  include_block = TRUE,
  include_MLM = TRUE,
  include_DB = TRUE,
  include_LM = TRUE,
  include_DBBlended = FALSE,
  include_method_characteristics = FALSE,
  weight_LM_method = "survey",
  weight_LM_scale_weights = TRUE,
  control_formula = NULL
)

Arguments

Yobs

vector observed outcomes (or column name in data)

Z

vector of assignment indicators (1==treated) (or column name in data)

B

vector of block ids (or column name in data)

siteID

site ids (variable name as string if data frame passed) (if randomization blocks are nested in site).

data

frame holding Y, Z, B and (possibly a column with name specified by siteID).

include_block

Include the standard error estimation found in Pashley (in particular, these work for blocks with singleton units).

include_MLM

Include MLM estimators

include_DB

Include Design-Based estimators (taken from RCTYes documentation and prior literature).

include_LM

Include Linear Model-based estimators (including Huber-White SEs, etc.)

include_DBBlended

Include DB estimators applied to small block (blocks with singleton treatment or control units) and classic Neyman to large blocks.

include_method_characteristics

Include details of the methods (target estimands and sampling framework assumed) in the return value.

weight_LM_method

Passed to weight.method of weighted_linear_estimators; specifies the weighting method.

weight_LM_scale_weights

This argument is passed to scale.weights of weighted_linear_estimators

control_formula

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

Value

Dataframe of point estimates and standard errors for each method considered. If include_method_characteristics=TRUE also add some features of the methods as additional columns.


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