You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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>
The text was updated successfully, but these errors were encountered: