Learn R Programming

MatchItSE (version 1.0)

add_model_matrix: Rebuilds the model matrix for MatchIt objects

Description

In order to use estimate Standard Errors with the Abadie and Imben's method the MatchIt object needs to have a model matrix. The model matrix is created based on the subclasses given by the full matching procedure.

Usage

add_model_matrix(fit)

Arguments

fit
MatchIt Object

Value

MatchIt Object with added model matrix

Details

This function is experimental! Most methods for estimating standard errors are only documented for NN matching. Please use with caution!

Examples

Run this code
## Not run: 
# library(MatchIt)
# data('lalonde')
# m.out  <- matchit(treat ~ educ + black, data = lalonde, method = 'full')
# att(obj = m.out, Y = lalonde$re78)
# abadie_imbens_se(m.out, lalonde$re78)  # FAILS!
# m.out <- add_model_matrix(m.out)
# abadie_imbens_se(m.out, lalonde$re78)
# ## End(Not run)

Run the code above in your browser using DataLab