Skip to contents

Randomization test for the specification of spillover effects utilizing hierarchical relationships between different exposures

Usage

testinterference(
  Y = NULL,
  Z = NULL,
  A = NULL,
  hypothesis = "SUTVA",
  method = "3-net",
  design = "complete",
  prob = NULL,
  focal_unit = NULL,
  num_focal_unit = NULL,
  num_randomization = 9999,
  strata = NULL,
  zmatrix = NULL,
  kappa = NULL,
  cores = 1
)

Arguments

Y

The n-dimensional outcome vector

Z

The n-dimensional binary treatment assignment vector

A

The n times n, binary, possibly asymmetric, adjacency matrix. The diagonal elements must be zero. This argument can be NULL if `hypothesis = "Fisher"`. Default is NULL.

hypothesis

A character specifying the null hypothesis of interest. Options are "Fisher", "SUTVA", "exposure1", and "exposure2". "Fisher" stands for Fisher's sharp null hypothesis in the canonical randomization test. "SUTVA", "exposure1", and "exposure2" correspond to the null hypotheses a, b, and c in Table 2 of Hoshino and Yanagi (2023). Default is "SUTVA". If `hypothesis = "exposure2"`, the user can specify the argument `kappa`.

method

A character specifying how to find focal units. Options are "3-net", "2-net", "random", and "manual", which stand for the 3-net (MIS-G) method, the 2-net (MIS-A) method, the random selection, and the manual selection. Default is "3-net". If `method = "random"`, the user can specify the argument `num_focal_unit`. If `method = "manual"`, the user must specify the argument `focal_unit`.

design

A character specifying the randomization design of the original experiment. Options are "Bernoulli", "complete", "stratified", and "other", which stand for Bernoulli randomization, complete randomization, stratified randomization, and other experimental designs. If `design = "Bernoulli"`, the user must specify the argument `prob`. If `design = "stratified"`,the user must specify the argument `strata`. If `design = "other"`, the user must specify the argument `zmatrix`.

prob

NULL, a scalar indicating the homogeneous probability of being treatment eligible, or an n-dimensional vector indicating the heterogeneous probabilities for treatment eligibility (i.e., the i-th element of `prob` indicates the probability that unit i becomes treatment eligible). This argument is used only when `design = "Bernoulli"`. Default is NULL.

focal_unit

NULL or an n-dimensional logical vector specifying whether each unit is focal. This argument is used only when `method = "manual"`. Default is NULL.

num_focal_unit

NULL or a positive scalar specifying the number of focal units. This argument is used only when `method = "random"`. Default is NULL.

num_randomization

A large positive integer specifying the number of randomization. Default is 9999. This argument is not used when `design = "other"`.

strata

NULL or an n-dimensional numerical vector indicating the stratum to which each unit belongs. This argument is used only when `design = "stratified"`. Default is NULL.

zmatrix

NULL or a large matrix of realizations of treatment assignments. This argument must be specified by the user only when `design = "other"`. The number of rows must equal to the sample size n. The number of columns is the number of realizations given by the user. Default is NULL.

kappa

NULL or a positive integer no less than 2. This argument is used only when `hypothesis = "exposure2"`. If `kappa = NULL`, kappa is automatically chosen to maximize the number of focal units. Default is NULL.

cores

A positive integer specifying the number of cores to use for parallel computing. Default is 1.

Value

A list containing the following elements:

pval

The vector of p-values obtained from KW, ACD, and OLS statistics

Simes

The vector of testing results by Simes’ correction under significance levels 10 TRUE (resp. FALSE) indicates the rejection (resp. acceptance) of the null hypothesis.

stat

A matrix of test statistics computed with focal assignments

focal_unit

The logical vector indicating whether each unit is focal

focal_asgmt

The matrix of focal assignments

num_focal_unit

The number of focal units

num_focal_asgmt

The number of focal assignments

Details

The `testinterference()` function performs randomization tests for the null hypotheses about the interference structure utilizing hierarchical relationships between different exposures. The null hypotheses of interest are the following. (1) Fisher's sharp null hypothesis: One's outcome does not depend on one's own treatment. (2) Stable Unit Treatment Value Assumption (SUTVA): One's outcome is determined by one's own treatment. (3) Exposure 1: One's outcome is determined by whether there is at least one treated unit in one's neighborhood including oneself. (4) Exposure 2: One's outcome is determined by one's own treatment and whether there is at least one treated peer. The testing procedures are developed by Hoshino and Yanagi (2023).

References

Hoshino, T., & Yanagi, T. (2023). Randomization Test for the Specification of Interference Structure. arXiv preprint arXiv:2301.05580.

Examples

data <- datageneration(n = 200)
test <- testinterference(Y = data$Y,
                         Z = data$Z,
                         A = data$A,
                         hypothesis = "SUTVA",
                         method = "3-net",
                         design = "complete",
                         num_randomization = 999,
                         cores = 1)