Description Usage Arguments Value Examples
the same as cfa method except it computes two results at the same time which allows one to conduct inference on their difference
1 2 3 4 5 |
formla |
a formula y ~ treatment |
tvals |
the values of the "treatment" to compute parameters of interest for |
yvals |
the values to compute the counterfactual distribution for |
data |
the data.frame where y, t, and x are |
xformla1 |
an optional formula for the first set of x variables |
method1 |
the first method for estimating the conditional distribution it can be "dr" for distribution regression or "qr" for quantile regression |
link1 |
if using distribution regression, set the link variable. It can be any link function accepted by glm, e.g. logit, probit, cloglog |
tau1 |
if using quantile regression, the values of tau to use, the default is seq(.01,.99,.01) |
condDistobj1 |
if have already calculated a conditional distribution object outside of the model, can set it here |
xformla2 |
an optional formula for the second set of x variables |
method2 |
the second method for estimating the conditional distribution it can be "dr" for distribution regression or "qr" for quantile regression |
link2 |
if using distribution regression, set the link variable. It can be any link function accepted by glm, e.g. logit, probit, cloglog |
tau2 |
if using quantile regression, the values of tau to use, the default is seq(.01,.99,.01) |
condDistobj2 |
if have already calculated a conditional distribution object outside of the model, can set it here |
se |
whether or not to compute standard errors using the bootstrap |
iters |
how many bootstrap iterations to use |
cl |
how many clusters to use for parallel computation of standard errors |
list of two CFA objects
1 2 3 4 5 6 7 8 | #' data(igm)
tvals <- seq(10,12,length.out=5)
yvals <- seq(quantile(igm$lcfincome, .05), quantile(igm$lcfincome, .95), length.out=50)
## obtain counterfactual results using quantile regression with
## no covariates and adjusting for education
cfa2(lcfincome ~ lfincome, tvals, yvals, igm, method1="qr", xformla2=~HEDUC,
method2="qr", se=FALSE, tau1=seq(.1,.9,.1), tau2=seq(.1,.9,.1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.