Skip to content

different calipers for different subproblems #197

@jwbowers

Description

@jwbowers

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:

  1. mat_lst <- lapply(subproblemids,function(id){ d_lst[[id]] + caliper(d_lst[[id]],thecalipers[[id]]) })

  2. Assuming that the rownames of the original data are carried correctly from the data to d (by match_on) and then to the subproblems by findSubproblems:

## 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions