cf: Control-Function

cfR Documentation

Control-Function

Description

Implement the control function method for estimation and inference of nonlinear treatment effects.

Usage

cf(formula, d1 = NULL, d2 = NULL)

Arguments

formula

A formula describing the model to be fitted.

d1

The baseline treatment value.

d2

The target treatment value.

Details

For example, the formula Y ~ D + I(D^2)+X|Z+I(Z^2)+X describes the models Y = α_0 + Dβ_1 + D^2β_2 + Xφ + u and D = γ_0 + Zγ_1 + Z^2γ_2 + Xψ + v. Here, the outcome is Y, the endogenous variables are D and I(D^2), the baseline covariates are X, and the instrument variables are Z. The formula environment follows the formula environment in the ivreg function in the AER package. The linear term of the endogenous variable, for example, D, must be included in the formula for the outcome model. If either one of d1 or d2 is missing or NULL, CausalEffect is calculated assuming that the baseline value d1 is the median of the treatment and the target value d2 is d1+1.

References

Guo, Z. and D. S. Small (2016), Control function instrumental variable estimation of nonlinear causal effect models, The Journal of Machine Learning Research 17(1), 3448–3482.

Examples

Y <- mroz[,"lwage"]
D <- mroz[,"educ"]
Z <- as.matrix(mroz[,c("motheduc","fatheduc","huseduc")])
X <- as.matrix(mroz[,c("exper","expersq","age")])
cf.model <- cf(Y~D+I(D^2)+X|Z+I(Z^2)+X)
summary(cf.model)


zijguo/RobustIV documentation built on Aug. 28, 2022, 6:21 a.m.