match_2C_list: Perform a pair (or 1:k) matching with two user-specified list...

View source: R/match_2C_list.R

match_2C_listR Documentation

Perform a pair (or 1:k) matching with two user-specified list representations of distance matrices.

Description

This function performs a pair-matching using (at most) two user-specified distance matrices in their (possibly sparse) list representations. For more details on “list representations” of a treatment-by-control distance matrix, see the documentation of the function “create_list_from_mat”.

Usage

match_2C_list(
  Z,
  dataset,
  dist_list_1,
  dist_list_2 = NULL,
  lambda = 1000,
  controls = 1,
  overflow = FALSE
)

Arguments

Z

A length-n vector of treatment indicator.

dataset

dataset to be matched.

dist_list_1

A (possibly sparse) list representation of treatment-by-control distance matrix.

dist_list_2

A second (possibly sparse) list representation of treatment-by-control distance matrix.

lambda

A penalty that does a trade-off between two parts of the network.

controls

Number of controls matched to each treated. Default is set to 1.

overflow

A logical value indicating if overflow protection is turned on.

Details

This function is designed for more experienced and sophisticated R users. Instead of providing possibly dense treatment-by-control distance matrices that take up a lot of memories, users may simply provide two lists that specifies information of edges: their starting points, ending points, capacity, and cost. For more information on list representations of a distance matrix, see the documentation of the function “create_list_from_mat” and “create_list_from_scratch”. Note that by setting dist_list_2 = NULL, the usual matching framework is restored.

Value

This function returns the same object as function match_2C_mat.


match2C documentation built on March 31, 2023, 6:39 p.m.