After you've run matchit(), the model used to generate the propensity
scores is stored in the matchit output object under m1$model. If you print
m1$model$coefficients, the colinear variable that was removed will have the
value NA. In general, the last variable(s) entered in the formula argument
that is(are) colinear with others will be removed. For propensity scores
using logistic regression (and probably others), matchit() uses glm(),
which functions similar to lm() in its treatment of multicolinearity/rank
deficiency.
Noah Greifer
On Mon, Nov 21, 2016 at 4:44 PM Ignacio Martinez <ignacio82(a)gmail.com>
wrote:
Hi,
Suppose my data looks something like this:
library(tidyverse)
set.seed(112116)
df <- data.frame(treatment=sample(x = c(0,1), size = 100, replace = T),
x1 = rnorm(n = 100, mean = 0, sd = 1),
x2 = runif(n = 100, -10, 10)) %>%
mutate(x3 = x1+x2,
y = 0.5*treatment + 2*x1 + 3*x2 + rnorm(100,0,1))
If I run:
lm(y~treatment+x1+x2+x3, data=df)
`lm` will automatically drop `x3` because of multicoliniarity. I assume
matchit is doing something similar. Is there a way of seeing which variable
is drooped?
m1 <- MatchIt::matchit(formula = treatment~x1+x2+x3, data = df, method =
"nearest")
summary(m1)
Thanks,
Ignacio
-
---
MatchIt mailing list served by HUIT
List Address: matchit(a)lists.gking.harvard.edu
Subscribe/Unsubscribe:
http://lists.gking.harvard.edu/mailman/listinfo/ei
MatchIt Software and Documentation:
http://gking.harvard.edu/matchit/
Browse/Search <http://gking.harvard.edu/matchit/Browse/Search> List
Archive:
http://lists.gking.harvard.edu/mailman/private/matchit/
Matchit mailing list
Matchit(a)lists.gking.harvard.edu
To unsubscribe from this list or get other information:
https://lists.gking.harvard.edu/mailman/listinfo/matchit