match_y1y0_bc {MatchGATE} | R Documentation |
Imputing Missing Potential Outcomes with Bias-Corrected Matching
Description
Impute missing potential outcomes for each individual with bias-corrected matching.
Usage
match_y1y0_bc(X, A, Y, miu1.hat, miu0.hat, 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. |
miu1.hat |
The estimated outcome regression function for |
miu0.hat |
The estimated outcome regression function for |
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 and
as the imputed potential
outcomes for individual
. For example, if
, then
.
However, for obtaining
, we require to introduce an outcome
regression function
for
. Let
be the fitted value of
, then
is defined as follows,
where represents the set of
matched individuals
with
, that are the closest to the individual
in terms of
covariates similarity, and vice versa.
Value
Returns a matrix of completed matches, where each row is the imputed
for each individual.
Examples
n = 100
X1 <- runif(n, -0.5,0.5)
X2 <- sample(c(0,1,2), n, TRUE)
X = cbind(X1, X2)
A = sample(c(0,1), n, TRUE)
Y = A * (2*X1) + X1 + X2^2 + rnorm(n)
miu1_hat <- cbind(1,X) %*% as.matrix(lm(Y ~ X, subset = A==1)$coef)
miu0_hat <- cbind(1,X) %*% as.matrix(lm(Y ~ X, subset = A==0)$coef)
match_y1y0_bc(X = X, A = A, Y = Y, miu1.hat = miu1_hat,
miu0.hat = miu0_hat, K = 5)