Description Usage Arguments Value Author(s)
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.
1 | constraint_equation(x, weight.var, match.var, replace)
|
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. |
A list with two named components: A and b, representing the components of the constraint equation Aw = b
David Kane <dave.kane@gmail.com>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.