View source: R/match_2C_list.R

match_2C_list | R Documentation |

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”.

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

`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. |

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.

This function returns the same object as function match_2C_mat.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.