Good afternoon,
I want to use matchit with a dot in the formula. (In R formulas, this
means all variables in the data that are not mentioned elsewhere in
the formula. This fails, with the error, "Error in
terms.formula(formula) : '.' in formula and no 'data' argument."
Here is an example with the lalonde data:
m.out <- matchit(treat ~ . - re78, data = lalonde, method = "nearest")
I can fix this with fix(matchit) and change line 34 to:
tt <- terms(formula, data = data)
Then the matchit function works as expected.
Is there any other way to use a dot in the formula for matchit, or to
match on all the remaining variables in the dataset? If not, I guess
this is a bug report with a really easy fix, assuming that I am not
overlooking something.
If I don't hear back from this list in a day or so, I will also post
to stackoverflow.
Thank you,
Seth Wayland