View source: R/make_fake_data.R
make.linear.data | R Documentation |
Given the parameters, generate a dataset and return a potential outcomes schedule (science table) of synthetic potential outcomes.
make.linear.data(
n,
gamma.vec = c(1, 2, 2, 1),
gamma2.vec = NULL,
beta.vec = c(-1, -1, 1),
ideo.sd = 0,
quad.tx = FALSE,
mu.X = FALSE,
corr.X = TRUE
)
make.quadradic.data(n, beta.vec = c(-1, -1, 1))
make.skew.data(n, beta.vec = c(-1, -1, 1))
n |
Sample size |
gamma.vec |
Control outcome surface |
gamma2.vec |
Quadratic terms |
beta.vec |
Treatment effect surface |
ideo.sd |
Ideosyncratic residual variation |
quad.tx |
Quadratic treatment effects? |
mu.X |
Center of the X covariates (can be single number or vector of length equal to the max of the length of gamma.vec, gamma2.vec, and beta.vec) |
corr.X |
TRUE or FALSE. Have Xs correlated or no. |
The control outcome surface is either linear or quadratic, of the form:
Y_i = \\gamma_0 + \\sum_{k=1}^J \\gamma_k X_{ki} + \\sum_{k=1}^{J_2} \\gamma^{(2)}_k X_{ki}^2 + \\epsilon_i
The individual treatment effects are similarly a linear or quadratic model.
List of elements of data (not data frame)
make.quadradic.data
: Generate dataset according to a quadratic model
make.skew.data
: Generate dataset with a skew
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.