data("lalonde", package = "MatchIt")
fit <- lm(re78 ~ treat * (age + race + nodegree + re74), data = lalonde)
# Simulate coefficients
s <- sim(fit)
s
## Could also use a robust covariance matrix, e.g.,
s <- sim(fit, vcov = "HC3")
# Simulated coefficients assuming a normal distribution
# for coefficients; default for `lm` objects is a t-
# distribution
s <- sim(fit, dist = "normal")
s
Run the code above in your browser using DataLab