compute counterfactuals using distribution regression with a continuous treatment

cfa(
formla,
xformla = NULL,
tvals,
yvals,
data,
method = "dr",
tau = seq(0.01, 0.99, 0.01),
condDistobj = NULL,
se = TRUE,
iters = 100,
cl = 1
)

Arguments

formla a formula y ~ treatment one sided formula for x variables to include, e.g. ~x1 + x2 the values of the "treatment" to compute parameters of interest for the values to compute the counterfactual distribution for the data.frame where y, t, and x are either "dr" or "qr" for distribution regression or quantile regression if using distribution regression, any link function that works with the binomial family (e.g. logit (the default), probit, cloglog) if using quantile regression, which values of tau to estimate the conditional quantiles optional conditional distribution object that has been previously computed whether or not to compute standard errors using the bootstrap how many bootstrap iterations to use how many clusters to use for parallel computation of standard errors

CFA object

Examples

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)
#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used
## This line adjusts for differences in education
cfa(lcfincome ~ lfincome, ~HEDUC, tvals=tvals, yvals=yvals, data=igm,
se=FALSE)
#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used#> Warning: the condition has length > 1 and only the first element will be used