*! version 1.0.6 15dec2022

Title

rndseq -- Generation of Random Sequences

Syntax

Syntax for simple randomization

rndseq simple, drug(string) prot(string) treat(string) n(#) [options]

Syntax for block randomization

rndseq block, drug(string) prot(string) treat(string) n(#) bs(#) [options]

Syntax for efron randomization

rndseq efron, drug(string) prot(string) treat(string) n(#) lp(#) hp(#) [options]

Simple randomization
n(#) number of subjects (integer multiple of num. treat)

ratio(numlist) list of randomization ratios (integers)

By default equal sample sizes are considered

Block randomization
n(#) number of subjects (integer multiple of bs)

bs(#) block size (integer multiple of ratio sum)

ratio(numlist) list of randomization ratios (integers)

By default equal sample sizes are considered

Efron randomization
n(#) number of subjects (integer multiple of num. treat)

lp(#) low probability of assignment (0 < lp < 0.5)

hp(#) high probability of assignment (0.5 < hp < 1)

Common parameters
treat(string) comma-separated list with the Treatments labels

drug(string) Drug label

prot(string) Protocol label

center(string) comma-separated list with the Labels of Centers

strata(string) comma-separated list with the Labels of Strata for Center

pcenter(numlist) expected proportions for each Center

pstrata(numlist) expected proportions for each Strata

The proportions expected in each center/stratum must add 1

By default equal proportions are considered

prefix(string) blank-separated list with the Prefix of subject number

seed(#) specify initial value of random-number seed

By default no seed is specified and RANDOM sequences are generated

noprint do not print results

using(filename) filename to store the results dataset; by default a dataset named
rndseq_results is saved in the current (working) directory

noreplace if filename exists, do not replace; by default existing datasets are replaced

nst(string) name of the study (label)

Description

Generation of Random Sequences. Three methods are available:

- simple Simple randomization

- block Blocking, balanced restricted randomization

- efron Efron adaptative biased-coin randomization

Some restrictions apply to the parameters, see the options. Optionally it is possible to define
a list of Centers and a list of by-Center Strata. If a prefix option is
specified, the number of elements must be equal to the multiplication of the number of centers and strata.

The results are stored in a new dataset named by default rndseq_results and saved in the current (working)
directory. Existing datasets are replaced by default.

You can click here to pop up a dialog or type db rndseq.

Execute net from http://metodo.uab.cat/stata for install.

It is important to keep the commands updated. Execute adoupdate rndseq, update to update the rndseq command.

Execute adoupdate, update to update all the user-written commands.

If you find any bugs or want to suggest any improvements, please send an e-mail to: leam@uab.cat.

Examples

Simple

. rndseq simple, drug(YEMR) prot(Y.1A) treat(50 mg, Placebo) n(86) center(Clinic BCN) prefix(PR) seed(1987653) using(HTA_Ruti_results.dta) nst(HTA_Ruti)

Block

. rndseq block, drug(YEMR) prot(Y.1A) treat(Placebo, 50mg, 100mg) n(30) bs(5) ratio(1 2 2) center(Center A, Center B) prefix(A B)

Efron

. rndseq efron, drug(AZX) prot(AZX.014) treat(A, B) n(24) lp(0.33333) hp(0.66667) center(Clinic, Sant Pau) pcenter(0.7 0.3)

Version

Version 1.0.6 -- 15 December 2022

Authors

JM.Doménech

Programmer: R.Sesma

Laboratori d'Estadística Aplicada

Universitat Autònoma de Barcelona

leam@uab.cat

Vancouver reference

Doménech JM. Generation of Random Sequences: User-written command rndseq for Stata [computer program].

V1.0.6. Bellaterra: Universitat Autònoma de Barcelona; 2022.

Available executing from Stata: net from http://metodo.uab.cat/stata

References

Delgado M, Llorca J, Doménech JM. Estudios experimentales. 5ª ed. Barcelona: Signo; 2012