Skip to contents

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

Usage

generate_permutations_bernoulli_cpp(n, nsim, prob_T)

Arguments

n

Number of subjects.

nsim

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

prob_T

Probability of assignment to treatment.

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).