| generate_permutations | R Documentation |
Core engine used by FRTCI and FRTCI_interact to compute
the randomization distribution of a test statistic under permuted
treatment assignments.
generate_permutations(
Y,
Z,
test.stat,
Y0.mat,
Y1.mat,
B,
n.cores,
get.z.star = NULL,
verbose = TRUE,
...
)
Y |
Outcome vector. |
Z |
Treatment assignment vector (0/1). |
test.stat |
Test statistic function taking (Y, Z, ...). |
Y0.mat |
N x grid.size matrix of imputed control potential outcomes. |
Y1.mat |
N x grid.size matrix of imputed treated potential outcomes. |
B |
Number of permutations. |
n.cores |
Number of cores for parallel computation. |
get.z.star |
Optional function to generate permuted Z vectors.
If NULL, uses |
verbose |
Whether to display a progress bar. Default is TRUE. |
... |
Additional arguments passed to |
A list with components:
Observed test statistic.
B x grid.size matrix of permuted test statistics.
Vector of p-values for each grid point.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.