From 5cf421bd53692229a2c58f981bc6e9a548844301 Mon Sep 17 00:00:00 2001 From: Gregory Chen <65814078+hoppanda@users.noreply.github.com> Date: Sun, 11 Aug 2024 21:48:24 +0200 Subject: [PATCH] Update R/matching.R Co-authored-by: Isaac Gravestock <83659704+gravesti@users.noreply.github.com> --- R/matching.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/matching.R b/R/matching.R index 037afec0..c37c5c62 100644 --- a/R/matching.R +++ b/R/matching.R @@ -129,8 +129,7 @@ estimate_weights <- function(data, set.seed(set_seed_boot) if (!is.null(boot_strata)) { - use_strata <- subset(data, subset = (!ind), select = boot_strata) - use_strata <- apply(use_strata, 1, paste, collapse = "--") |> factor() + use_strata <- interaction(data[!ind, boot_strata]) } else { use_strata <- rep(1, nrow(EM)) }