Test2SRE {RCT2} | R Documentation |
Hypothesis testing for three null hypotheses
Description
This function tests the null hypotheses of no direct effect, no marginal direct effect, and no spillover effect.
Usage
Test2SRE(data, effect = "DE", alpha = 0.05)
Arguments
data |
A data frame containing the relevant variables. The names for the variables should be “Z” for the treatment assignment, “Y” for the treatment outcome, “A” for the treatment assignment mechanism, and “id” for the cluster ID. The variable for the cluster ID should be a factor. |
effect |
Specify which null hypothesis to be tested. “DE” for direct effect, “ME” for marginal effect, and “SE” for spillover effect. |
alpha |
The level of significance at which the test is to be run (default is 0.05). |
Details
For the details of the method implemented by this function, see the references.
Value
A list of class Test2SRE
which contains the following item:
rej |
Rejection region for test conducted. |
Author(s)
Kosuke Imai, Department of Statistics, Harvard University imai@harvard.edu, https://imai.fas.harvard.edu/; Zhichao Jiang, School of Public Health and Health Sciences, University of Massachusetts Amherst zhichaojiang@umass.edu; Karissa Huang, Department of Statistics, Harvard College krhuang@college.harvard.edu
References
Zhichao Jiang, Kosuke Imai (2020). “Statistical Inference and Power Analysis for Direct and Spillover Effects in Two-Stage Randomized Experiments”, Technical Report.
Examples
data(jd)
data_LTFC <- data.frame(jd$assigned, jd$pct0, jd$cdd6m, jd$anonale)
colnames(data_LTFC) <- c("Z", "A", "Y", "id")
Test2SRE(data_LTFC, effect="MDE", alpha=0.05)