Run compute_sim_result
in parallel using parallel::mclapply
or parallel::parLapply
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | parallel_sim(
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,
iterations = 100L,
num_cores = parallel::detectCores(),
num_cores1 = 1,
operating_system = "Mac",
names_list = NULL,
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. |
iterations |
Number of iterations to complete. |
num_cores |
Number of cores to use. |
num_cores1 |
Number of cores to use. |
operating_system |
"Mac," "Windows," etc. If Windows, uses parLapply instead of mclapply. |
names_list |
Default NULL. List of index names to return with the results. |
silent |
Whether to suppress messages as it's running.. Default |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.