simulate_data {drape}R Documentation

Generate simulation data.

Description

If ex_setting = "401k" then 401k data set is used for (X,Z). Otherwise:

Usage

simulate_data(n, ex_setting, f_setting)

Arguments

n

integer number of samples. For "401k" ex_setting this is ignored and the whole data set is used.

ex_setting

string "normal", "mixture2", "mixture3", "logistic", "t4", "401k".

f_setting

string "plm", "additive", "interaction".

Details

Z ~ N_9(0,Sigma), where Sigma_jj = 1, Sigma_jk = corr for all j not equal to k. X = m(Z) + s(Z)*ex where m and sigma are step functions of z_1 and z_3 respectively. Y = f(X,Z) + N(0,1)

Value

list containing y, x, z. Additionally contains the population nuisance parameters evaluated on the data, and the sample version of the average partial effect.

Examples

simulate_data(100, "normal", "plm")

[Package drape version 0.0.1 Index]