match_y1y0 {MatchGATE} | R Documentation |
Imputing Missing Potential Outcomes with Matching
Description
Impute missing potential outcomes for each individual with matching.
Usage
match_y1y0(X, A, Y, K = 5, method = "euclidean")
Arguments
X |
A matrix representing covariates, where each row represents the value of a different covariates for an individual. |
A |
A vector representing the treatment received by each individual. |
Y |
A vector representing the observed outcome for each individual. |
K |
When imputing missing potential outcomes, the average number of similar individuals are taken based on covariates similarity. |
method |
The distance measure to be used. It is a argument embed in
|
Details
Here are the implementation details for the imputation processes.
Denote \hat{Y}^0_i
and \hat{Y}^1_i
as the imputed potential
outcomes for individual i
. Without loss of generality, if A_i = 0
, then
\hat{Y}^0_i = Y_i
, and \hat{Y}^1_i
is the average of outcomes for the K units that are the most
similar to the individual i
, i.e.,
\hat{Y}_i^0 = \frac 1 K \sum_{j\in\mathcal{J}_K(i)}Y_j,
where \mathcal{J}_K(i)
represents the set of K
matched individuals
with A_i = 1
, that are the closest to the individual i
in terms of
covariates similarity, and vice versa.
Value
Returns a matrix of completed matches, where each row is the imputed (Y^1, Y^0)
for each individual.
Examples
n <- 100
p <- 2
X <- matrix(rnorm(n*p), ncol = p)
A <- sample(c(0,1), n, TRUE)
Y <- A * (2*X[,1]) + X[,2]^2 + rnorm(n)
match_y1y0(X = X, A = A, Y = Y, K =5)