make_dilated_out: Create potential dilated outcomes.

Description Usage Arguments Details Value Functions References Examples

View source: R/make_dilated_out.R

Description

Create potential dilated outcomes for simulation.

Usage

1
2
3
4
5
6
7
8
make_dilated_out(adj_matrix, make_corr_out, seed, hop, multipliers = NULL)

make_dilated_out_full_neighborhood(
  adj_matrix,
  make_corr_out,
  multipliers = NULL,
  seed = NULL
)

Arguments

adj_matrix

an N * N numeric matrix of 0, 1 entries such as those retuned by make_adj_matrix, or a N * N matrix, where N is the number of units.

make_corr_out

unused.

seed

random number for result replicability.

hop

number; either 1 or 2. If 1 assumes first-degree interference and produces four exposure conditions, if 2 assumes second-degree interference and produces eight exposure conditions.

multipliers

numeric vector with dilated effects multipliers. Must be of length 3 if hop is 1, and length 7 if hop is 2. Default are c(2,1.5,1.25) and c(2.25,2,1.75,1.5,1.375,1.25,1.125).

Details

make_dilated_out produces potential dilated outcomes for simulation according to two different exposure mappings. An exposure mapping that assumes that interference happens only through direct peer connections (first-degree interference) which produces four exposure conditions: Direct + Indirect Exposure, Isolated Direct Exposure, Indirect Exposure, No Exposure. And an exposure mapping that assumes second-degree interference which produces eight exposure conditions. The values for the baseline No Exposure condition are drawn from an absolute standard normal distribution which is correlated with the unit's first and second order degree. The values for the other exposure conditions are obtained by multiplying the vector of multipliers by the baseline No Exposure value.

Value

An K * N named numeric matrix, where K corresponds to the number of exposure conditions and N number of units.

Functions

References

Aronow, P.M. et al. (2020). Spillover effects in experimental data. arXiv preprint, arXiv:2001.05444.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
adj_matrix <- make_adj_matrix(N = 9, model = 'sq_lattice')
multipliers <- c(2, 1.5, 1.25)
make_dilated_out(adj_matrix, make_corr_out, seed = 357,
multipliers = multipliers, hop = 1)
multipliers <- c(2.25,2,1.75,1.5,1.375,1.25,1.125)
make_dilated_out(adj_matrix, make_corr_out, seed = 357,
multipliers = multipliers, hop = 2)
multiplier <- 4
make_dilated_out_full_neighborhood(adj_matrix, make_corr_out,
                                   multipliers=multiplier,
                                   seed=357)    

szonszein/interference documentation built on Jan. 10, 2022, 6:35 p.m.