get_maei_clust_rand: MAEI Calculation for Cluster-Randomized Experiments

View source: R/get_maei_clu_rand.R

get_maei_clust_randR Documentation

MAEI Calculation for Cluster-Randomized Experiments

Description

This function calculates the maximum aggregate electoral impact (MAEI) for cluster randomized experiments following Slough (2023). This function returns the MAEIs under each of three assumptions about interference between voters. MAEI_d assumes no within-cluster or between-cluster spillovers; MAEI_w assumes within-cluster but no between-cluster spillovers (SUTVA); and MAEI_bw assumes within-cluster and bounded between-cluster spillovers. The argument psi uses the calculated MAEIs to implement the decision rule proposed in the paper.

Usage

get_maei_clust_rand(
  vr,
  dist,
  nvoters,
  cluster,
  Z,
  s10,
  s01 = NULL,
  pi = NULL,
  exp_ac0 = 1,
  psi = NULL,
  ...
)

Arguments

vr

a data frame contains variables: district, cluster (unit of random assignment), and corresponding the number of registered voters in the cluster.

dist

a character to specify the column name of the district variable in the data frame vr.

nvoters

a character to specify the column number of the number of voters in the data frame vr.

cluster

a character to to specify the column number of the cluster variable in the data frame vr.

Z

a vector to denote the cluster-level treatment assignments.

s10

a number or vector to denote the individuals exposed to the treatment because it is assigned experimentally. It can be the number of voters or the proportion of the electorate (between 0 and 1).

s01

a number or vector to denote the individuals not exposed to the treatment because is assigned experimentally. It can be the number of voters or the proportion of the electorate (between 0 and 1). The default value is NULL which corresponds to the case in which a researcher designs and implements an intervention that would otherwise not have occurred. If it is not NULL, it corresponds to the case in which some intervention by a third party is modified to include an experimental component.

pi

a number or vector to to measure researchers’ ex-ante beliefs about the proportion (between 0 and 1) of voters that could respond to treatment (or some manifestation thereof) in clusters where allocation of the intervention is not changed by the experiment.

exp_ac0

a number or vector to denote the expectation of untreated potential outcome. The default value is 1 which will return the most conservative bound.

psi

a number or vector specifying “margin to pivotality”, as minimum change in vote share, as a proportion of registered voters, at which a different officeholder would be elected in district. If psi > 2MAEI (Maximal Aggregate Electoral Impact), an experiment could not change the ultimate electoral outcome (the output result will show "PASS" the decision rule); in contrast, if psi < 2MAEI, the experiment could affect the ultimate electoral outcome (the output result will show "FAIL"). The decision rule in Slough (2023) advocates use of the fith percentile of the predictive distribution as the predicted value of psi.

References

Slough, Tara. 2023. "The Ethics of Electoral Experimentation: Design-Based Recommendations." Working paper. Available at www.taraslough.github.io/assets/pdf/eee.pdf.

Examples


### input data
data(rv)
require(randomizr)
set.seed(10)
Z = block_ra(blocks = rv$d, prob = 1/3) ### generate treatment assignments

### specify s01 as 30 (thus case 2)
get_maei_clust_rand (vr = rv, dist = "d",
nvoters = "n_voters",
cluster = "c", Z = Z,
s10 = 0.2, s01 = 30,
exp_ac0 = 1)

### s10 can be a vector;
get_maei_clust_rand (vr = rv, dist = "d",
nvoters = "n_voters",
cluster = "c", Z = Z,
s10 = round(runif(n = 150,min = 25,max = 75)),
s01 = 30, pi = 0.2)

### add pi = 0.3 to calculate MADI_bw
get_maei_clust_rand (vr = rv, dist = "d",
nvoters = "n_voters",
cluster = "c", Z = Z,
s10 = 0.2, s01 = 30)


### let margin to pivotality psi as say 0.8
get_maei_clust_rand (vr = rv, dist = "d",
nvoters = "n_voters",
cluster = "c", Z = Z,
s10 = 0.4,
s01 = 30, pi = 0.1, psi = 0.8)


Jiawei-Fu/maei_tmp documentation built on Oct. 15, 2023, 6:53 p.m.