constraint_equation: Creates a constraint equation based on the input data frame.

Description Usage Arguments Value Author(s)

Description

Given an input data frame, extract the matching vectors and the weight vectors out of the data frame. Then format the extracted data to form a linear constraint Aw=b that defines a sample space from which we will later sample from.

Usage

1
constraint_equation(x, weight.var, match.var, replace)

Arguments

x

data frame containing needed input data

weight.var

character name of the column of the input weights

match.var

character vector of names of columns of 'data' we wish to match on

replace

logical indicating whether or not observations weighted in the original weight.var are allowed positive weight in the output.

Value

A list with two named components: A and b, representing the components of the constraint equation Aw = b

Author(s)

David Kane <dave.kane@gmail.com>


davidkane9/kmatching documentation built on May 15, 2019, 1:14 a.m.