treated_control_net: Create a treate-to-control network to be solved via a network...

View source: R/treated_control_net.R

treated_control_netR Documentation

Create a treate-to-control network to be solved via a network flow algorithm.

Description

This function takes in a list representation of distance matrix and create a network structure to be solved.

Usage

treated_control_net(n_t, n_c, dist_list, controls = 1)

Arguments

n_t

Number of treated subjects.

n_c

Number of controls.

dist_list

A list representation of the distance matrix.

controls

Number of controls matched to each treated.

Details

dist_list is a list consisting of the following three elements: start_n: the starting nodes for all edges, end_n: the ending nodes for all edges, d: distance of all treated-control edges. Function create_dist_list in this package constructs such a list representation given a user-specified distance function.

Value

This function returns a list of five vectors: startn, endn, ucap, cost, b.


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