forked from kosukeimai/MatchIt
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The error below occurs about 30% of the time I submit the following code using my current dataset. ("distance" obviously is calculated by matchit.) Perhaps it's related to the random component in lasso? Or am I combining options I shouldn't? Thanks.
m.maha <- matchit(
f.build('enrolled',all_vars),
data = chw,
method = "nearest",
exact = "medicare",
ratio = 4,
reuse.max = 2,
min.controls=2,
max.controls=7,
replace = TRUE,
distance = "lasso",
estimand = "ATT",
discard = "both",
mahvars = all_vars,
reestimate = TRUE,
caliper = .2,
std.caliper = TRUE)
Error in matchit():
! Calipers cannot be used with binary, factor, or character variables. Offending variables:
<distance>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels