R/rnd_rerand.R
rnd_rerand.Rd
Conduct a re-randomization procedure using a specified set of covariates, for each random assignment a mahalanobis distance of group means will be computed with a sample size adjustment, and the user can either allow the program to find a cut-off from a chi-square distribution for an given acceptance probability, default probability is 0.001. Otherwise specify the cutoff, M-distance.
rnd_rerand(x, cutoff, pr_a, seed)
x | an id, vector to assign groups to |
---|---|
cutoff | Mahalanobis distance cut-off |
pr_a | Probability of acceptance, used if cutoff is null; default is 0.001 |
seed | A seed for random assignment reproducibility |
A dataframe, contains id, group assignment, and attributes giving the seed, cut-off, randomization date, number of iterations needed to achieve randomization