-
Notifications
You must be signed in to change notification settings - Fork 14
different calipers for different subproblems #197
Description
Hi all,
I have a design with 12 subproblems. The best calipers differ by subproblems (we have more and easier to match people near Kano, Nigeria than in the Northeastern part of the country). My inspection of the code suggests that while arguments to fullmatch like min.controls can take names of of the subproblems but that caliper cannot.
I could apply calipers to each subproblem in the list created by findSubproblems(d) (where d arises from match_on and exactmatch), but then I have a list of matrices rather than an object I can offer to fullmatch.
Should this then be a two step process:
-
mat_lst <- lapply(subproblemids,function(id){ d_lst[[id]] + caliper(d_lst[[id]],thecalipers[[id]]) }) -
Assuming that the rownames of the original data are carried correctly from the data to
d(bymatch_on) and then to the subproblems byfindSubproblems:
## d is the original match_on, exactMatch object
newd <- d
newd[rownames(mat_lst[[1]]),colnames(mat_lst[[1]])] <- mat_lst[[1]]
thematch <- fullmatch(newd,...)Is this right? Or is there another approach you have taken or envision which is more in line with how you manage vector-valued arguments to fullmatch?