Description Usage Arguments Value Examples
compute counterfactuals using distribution regression with a continuous treatment
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
formla |
a formula y ~ treatment |
xformla |
one sided formula for x variables to include, e.g. ~x1 + x2 |
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 |
method |
either "dr" or "qr" for distribution regression or quantile regression |
link |
if using distribution regression, any link function that works with the binomial family (e.g. logit (the default), probit, cloglog) |
tau |
if using quantile regression, which values of tau to estimate the conditional quantiles |
condDistobj |
optional conditional distribution object that has been previously computed |
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 |
CFA object
1 2 3 4 5 6 7 8 9 10 | data(igm)
tvals <- seq(10,12,length.out=8)
yvals <- seq(quantile(igm$lcfincome, .05), quantile(igm$lcfincome, .95), length.out=50)
## This line doesn't adjust for any covariates
cfa(lcfincome ~ lfincome, tvals=tvals, yvals=yvals, data=igm,
se=FALSE)
## This line adjusts for differences in education
cfa(lcfincome ~ lfincome, ~HEDUC, tvals=tvals, yvals=yvals, data=igm,
se=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.