generate_simulation_input: generate_simulation_input

Description Usage Arguments Value

View source: R/generate_simulation_input.R

Description

Generates input needed for a simulation run.

Usage

1
2
3
4
5
6
7
8
generate_simulation_input(
  n_rows = 500L,
  n_cols = 5L,
  x_generator = default_x_generator,
  treat_prob_generator = example_treat_prob_generator,
  mean_generator = example_mean_generator,
  error_generator = default_error_generator
)

Arguments

n_rows

How many rows to generate.

n_cols

How many columns to use.

x_generator

Function that takes number of rows and columns and produces a data matrix of that dimension.

treat_prob_generator

Function that takes a matrix and produces treatment probabilities.

mean_generator

Function that takes a matrix and produces an expected value for each row.

error_generator

Function that accepts a number of rows and generates an error vector (e.g. normal noise).

Value

List:

x_mat

Data Matrix

treat_vec

Treatment Vector

y_vec

Output Vector


rzgross/uRbanmatching documentation built on Dec. 22, 2021, 8:20 p.m.