Question about matchit

Each time I use a matchit package, the results of conditional logistic regression are different.

Is it right? =
opt.psm.out4 = matchit(treat~ gr_age+sex+dx_htn+dx_dm+dx_ckd+gr_cci, method = "nearest", data =, ratio=3)
opt.data4 =

#Getting strata from nearest neighbor matching
opt.data4$subclass <- vapply(rownames(opt.data4), function(x) {
out <- which(rownames(match.matrix) == x | apply(match.matrix, 1, function(y) x %in% y))
if (length(out) == 0) out <- NA_integer_
}, integer(1L))
cbind(table(opt.data4$subclass ))

The question requires a reprex to allow reproducing the problem, a necessary first step in suggesting a solution.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.