make_plr_turrell2018 | R Documentation |
Generates data from a partially linear regression model used in a blog article by Turrell (2018). The data generating process is defined as
d_i = m_0(x_i' b) + v_i,
y_i = \theta d_i + g_0(x_i' b) + u_i,
with v_i \sim \mathcal{N}(0,1)
, u_i \sim \mathcal{N}(0,1)
, and
covariates x_i \sim \mathcal{N}(0, \Sigma)
, where \Sigma
is a random symmetric, positive-definite matrix generated with
clusterGeneration::genPositiveDefMat()
. b
is a vector with entries
b_j=\frac{1}{j}
and the nuisance functions are given by
m_0(x_i) = \frac{1}{2 \pi}
\frac{\sinh(\gamma)}{\cosh(\gamma) - \cos(x_i-\nu)},
g_0(x_i) = \sin(x_i)^2.
make_plr_turrell2018(
n_obs = 100,
dim_x = 20,
theta = 0.5,
return_type = "DoubleMLData",
nu = 0,
gamma = 1
)
n_obs |
( |
dim_x |
( |
theta |
( |
return_type |
( |
nu |
( |
gamma |
( |
A data object according to the choice of return_type
.
Turrell, A. (2018), Econometrics in Python part I - Double machine learning, Markov Wanderer: A blog on economics, science, coding and data. https://aeturrell.com/blog/posts/econometrics-in-python-parti-ml/.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.