scoreCaliper: (Internal) Helper function to create an InfinitySparseMatrix...

View source: R/match_on.R

scoreCaliperR Documentation

(Internal) Helper function to create an InfinitySparseMatrix from a set of scores, a treatment indicator, and a caliper width.

Description

(Internal) Helper function to create an InfinitySparseMatrix from a set of scores, a treatment indicator, and a caliper width.

Usage

scoreCaliper(x, z, caliper)

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.

Value

An InfinitySparseMatrix object, suitable to be passed to match_on as an within argument.


markmfredrickson/optmatch documentation built on Nov. 24, 2023, 3:38 p.m.