Generates data from a partially linear regression model used in Chernozhukov et al. (2018)
Source:R/datasets.R
make_plr_CCDDHNR2018.Rd
Generates data from a partially linear regression model used in Chernozhukov et al. (2018) for Figure 1. The data generating process is defined as
\(d_i = m_0(x_i) + s_1 v_i,\)
\(y_i = \alpha d_i + g_0(x_i) + s_2 \zeta_i,\)
with \(v_i \sim \mathcal{N}(0,1)\) and \(\zeta_i \sim \mathcal{N}(0,1),\). The covariates are distributed as \(x_i \sim \mathcal{N}(0, \Sigma)\), where \(\Sigma\) is a matrix with entries \(\Sigma_{kj} = 0.7^{|j-k|}\). The nuisance functions are given by
\(m_0(x_i) = a_0 x_{i,1} + a_1 \frac{\exp(x_{i,3})}{1+\exp(x_{i,3})},\)
\(g_0(x_i) = b_0 \frac{\exp(x_{i,1})}{1+\exp(x_{i,1})} + b_1 x_{i,3},\)
with \(a_0=1\), \(a_1=0.25\), \(s_1=1\), \(b_0=1\), \(b_1=0.25\), \(s_2=1\).
Arguments
- n_obs
(
integer(1)
)
The number of observations to simulate.- dim_x
(
integer(1)
)
The number of covariates.- alpha
(
numeric(1)
)
The value of the causal parameter.- return_type
(
character(1)
)
If"DoubleMLData"
, returns aDoubleMLData
object. If"data.frame"
returns adata.frame()
. If"data.table"
returns adata.table()
. If"matrix"
a namedlist()
with entriesX
,y
andd
is returned. Every entry in the list is amatrix()
object. Default is"DoubleMLData"
.
References
Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W. and Robins, J. (2018), Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal, 21: C1-C68. doi:10.1111/ectj.12097 .