View source: R/counterfactual.R
compute.counterfactual | R Documentation |
The internal code for computing counterfactual distributions
compute.counterfactual(outcome, wfun1, wfun2, data, tau = seq(0.1, 0.9,
0.1), numyvals = NULL)
outcome |
A vector of outcomes |
wfun1 |
A function that takes in 'data' and returns a vector of the same length as 'outcome' that contains the first set of weights |
wfun2 |
A function that takes in 'data' and returns a vector of the same length as 'outcome' that contains the first set of weights |
data |
A data.frame for which the functions wf1(data) and wf2(data) will be called |
tau |
The values at which to compute quantile effects, this should be a numeric vector with values strictly between 0 and 1 |
numyvals |
The number of values of the outcome to use in computing counterfactual distributions. The default is to use all of them; it may speed up computation to set this equal to some smaller number (e.g. 100) |
A list that contains the difference in average outcomes using each set of weights, the distribution functions using each set of weights, the quantiles (and their difference) using each set of weights, tau, and the sequence of y values used to construct the distributions
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.