Skip to contents

See generate_permutations_matching_cpp for the reproducibility note that applies to every function in this file.

Usage

generate_permutations_blocking_cpp(n, nsim, prob_T, strata_indices)

Arguments

n

Number of subjects.

nsim

Number of randomization draws (columns of the returned matrix) to generate.

prob_T

Probability of assignment to treatment.

strata_indices

List of integer vectors, one per stratum, holding the (1-based) indices of the subjects in that stratum.

Value

A list with w_mat, an n x nsim integer matrix whose columns are independent 0/1 treatment-assignment draws, and m_mat (always NULL).