preserve. set printback=on. * SIMPLE AND COMPLEX RANDOM ASSIGNMENT IN EXPERIMENTAL DESIGNS Valentim R. Alferes, University of Coimbra (Portugal), 2009. * IndRO.sps - Independent Random Order of Treatments. set printback=off. new file. input program. * Replace "?" with the number of treatments. loop ntreat=1 to ?. end case. end loop. end file. end input program. execute. set seed random. * Replace "?" with the number of experimental units. do repeat C= C_1 to C_?. compute C=rv.uniform(0,1). end repeat. execute. delete variables ntreat. rank variables=all/print=no. compute name=$casenum. execute. formats all(f8.0). * Replace "?" with the number of experimental units. flip variables=RC_1 to RC_? /newname=name. delete variables case_lbl. compute Unit=$casenum. execute. formats all(f8.0). oms/select tables/if commands=["summarize"] subtypes=["case processing summary"]/destination viewer=no. summarize/tables=unit all/format=list nocasenum nototal /title='Independent Random Order of Treatments'/cells=none. restore.