Learn R Programming

match2C (version 1.2.1)

stitch_two_nets: Stitch two treated-to-control networks into one two-part networks.

Description

This function takes as inputs two networks and one penalty lambda, and constructs one two-part network out of them.

Usage

stitch_two_nets(net1, net2, lambda, controls = 1, overflow = FALSE)

Arguments

net1

A list of five vectors: startn, endn, ucap, cost, b.

net2

A list of five vectors: startn, endn, ucap, cost, b.

lambda

A penalty.

controls

Number of controls matched to each treated.

overflow

A logical value indicating if overflow protection is turned on.

Value

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

Details

This function is of limited interest to users. Once overflow is set to TRUE, each cotnrol in the first network will be directly connected to the sink at a large cost, so that the network flow problem is feasible as long as the first part is feasible.