Description Usage Arguments Value
View source: R/compute_sim_result.R
Takes in functions to generate simulation data, and computes simulation results for our method vs. Mahalanobis and propensity score matching.
1 2 3 4 5 6 7 8 9 10 11 12 | compute_sim_result(
x_generator = default_x_generator,
treat_prob_generator,
mean_generator,
error_generator = default_error_generator,
n_sink_gen = n_sink_generator(),
match_method = "with_replacement",
n_rows = 500L,
n_cols = 5L,
num_weight_vectors = 100L,
silent = !interactive()
)
|
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). |
n_sink_gen |
Default |
match_method |
"with_replacement", "optimal", or "greedy" |
n_rows |
How many rows to generate. |
n_cols |
How many columns to use. |
num_weight_vectors |
How many weight vectors to generate. |
silent |
Whether to suppress messages as it's running.. Default |
Returns a named list:
naive_est
Mean difference between all treated units and all control
propensity_results
List of lists: each with n_sinks
and the est
mahal_results
Same as above
weighted_results
List of lists: each with n_sinks
, the raw brier score, the permutation brier score, and the est
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.