Generates covariates and potential outcomes of a synthetic dataset for a simple tree model.
Usage
simple_tree_data(
A,
K = 5,
p = 10,
noise_std = 1,
split = 1.676,
signal_strength = 1,
noise_form = "normal"
)
Arguments
- A
Integer. Number of observations in the dataset. Must be a positive integer.
- K
Integer. Number of arms. Must be a positive integer.
- p
Integer. Number of covariates. Must be a positive integer.
- noise_std
Numeric. Standard deviation of the noise added to the potential outcomes. Must be a non-negative number.
- split
Numeric. Split point for creating treatment groups based on the covariates.
- signal_strength
Numeric. Strength of the signal in the potential outcomes.
- noise_form
Character. Distribution of the noise added to the potential outcomes. Can be either "normal" or "uniform".
Value
A list containing the generated data (xs
, ys
, muxs
) and the true potential outcome means (mus
).
Examples
set.seed(123)
A <- 1000
K <- 4 # Number of treatment arms
p <- 10 # Number of covariates
synthetic_data <- simple_tree_data(A = A,
K = K,
p = p,
noise_std = 1.0,
split = 1.676,
signal_strength = 1.0,
noise_form = 'normal')