make_irm_data: Generates data from a interactive regression (IRM) model.

Description Usage Arguments References

View source: R/datasets.R

Description

Generates data from a interactive regression (IRM) model. The data generating process is defined as

d_i = 1≤ft\lbrace \frac{\exp(c_d x_i' β)}{1+\exp(c_d x_i' β)} > v_i \right\rbrace,

y_i = θ d_i + c_y x_i' β d_i + ζ_i,

with v_i \sim \mathcal{U}(0,1), ζ_i \sim \mathcal{N}(0,1) and covariates x_i \sim \mathcal{N}(0, Σ), where Σ is a matrix with entries Σ_{kj} = 0.5^{|j-k|}. β is a dim_x-vector with entries β_j = \frac{1}{j^2} and the constancts c_y and c_d are given by

c_y = √{\frac{R_y^2}{(1-R_y^2) β' Σ β}},

c_d = √{\frac{(π^2 /3) R_d^2}{(1-R_d^2) β' Σ β}}.

The data generating process is inspired by a process used in the simulation experiment (see Appendix P) of Belloni et al. (2017).

Usage

1
2
3
4
5
6
7
8
make_irm_data(
  n_obs = 500,
  dim_x = 20,
  theta = 0,
  R2_d = 0.5,
  R2_y = 0.5,
  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.

R2_d

(numeric(1))
The value of the parameter R_d^2.

R2_y

(numeric(1))
The value of the parameter R_y^2.

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

Belloni, A., Chernozhukov, V., Fernández-Val, I. and Hansen, C. (2017). Program Evaluation and Causal Inference With High-Dimensional Data. Econometrica, 85: 233-298.


DoubleML documentation built on Oct. 26, 2021, 5:06 p.m.