make_iivm_data {DoubleML} | R Documentation |
Generates data from a interactive IV regression (IIVM) model.
Description
Generates data from a interactive IV regression (IIVM) model.
The data generating process is defined as
di=1{αxZ+vi>0},
yi=θdi+xi′β+ui,
Z∼Bernoulli(0.5)
and
(uivi)∼N(0,(10.30.31)).
The covariates :xi∼N(0,Σ)
, where Σ
is a matrix with entries
Σkj=0.5∣j−k∣
and β
is a dim_x
-vector with
entries βj=j21
.
The data generating process is inspired by a process used in the
simulation experiment of Farbmacher, Gruber and Klaaßen (2020).
Usage
make_iivm_data(
n_obs = 500,
dim_x = 20,
theta = 1,
alpha_x = 0.2,
return_type = "DoubleMLData"
)
Arguments
n_obs |
(integer(1) )
The number of observations to simulate.
|
dim_x |
(integer(1) )
The number of covariates.
|
theta |
(numeric(1) )
The value of the causal parameter.
|
alpha_x |
(numeric(1) )
The value of the parameter αx .
|
return_type |
(character(1) )
If "DoubleMLData" , returns a DoubleMLData object.
If "data.frame" returns a data.frame() .
If "data.table" returns a data.table() .
If "matrix" a named list() with entries X , y , d and z
is returned.
Every entry in the list is a matrix() object. Default is "DoubleMLData" .
|
References
Farbmacher, H., Guber, R. and Klaaßen, S. (2020).
Instrument Validity Tests with Causal Forests.
MEA Discussion Paper No. 13-2020.
Available at SSRN:doi:10.2139/ssrn.3619201.
[Package
DoubleML version 1.0.1
Index]