| gen_data {FLAME} | R Documentation |
Generate Toy Data for Matching
Description
gen_data generates toy data that can be used to explore FLAME and DAME
functionality.
Usage
gen_data(n = 250, p = 5, write = FALSE, path = getwd(), filename = "AME.csv")
Arguments
n |
Number of units desired in the data set. Defaults to 250. |
p |
Number of covariates in the data set. Must be greater than 2. Defaults to 5. |
write |
A logical scalar. If |
path |
The path to the location where the data should be written if
|
filename |
The name of the file to which the data should be written if
|
Details
gen_data simulates data in the format accepted by FLAME
and link{DAME}. Covariates X_i and treatment T are both
independently generated according to a Bernoulli(0.5) distribution. The
outcome Y is generated according to Y = 15X_1 - 10X_2 + 5X_3 + 5T
+ \epsilon, where \epsilon \sim N(0, I_n). Thus, the value of p
must be at least 3 and any additional covariates beyond X_1, X_2, X_3
are irrelevant.
Value
A data frame that may be passed to FLAME or
DAME. Covariates are numeric, treatment is binary numeric and
outcome is numeric.