(Internal) Helper function to create an InfinitySparseMatrix from a set of scores, a treatment indicator, and a caliper width.
Source:R/match_on.R
scoreCaliper.Rd(Internal) Helper function to create an InfinitySparseMatrix from a set of scores, a treatment indicator, and a caliper width.
Arguments
- x
The scores, a vector indicating the 1-D location of each unit.
- z
The treatment assignment vector (same length as
x)- caliper
The width of the caliper with respect to the scores
x.- within
A valid distance specification, such as the result of
exactMatchorcaliper. Finite entries indicate which distances to create. Including this argument can significantly speed up computation for sparse matching problems. Specify this filter either viawithinor viastrataelements of a formula; mixing these methods will fail.
Value
An InfinitySparseMatrix object, suitable to be
passed to match_on as an within argument.