编程技术、软件应用与系统模拟(Programming, Applicaiton and Simulation)
|
|
|
座右铭: 只做有益人类的事 不做有害人类的事
|
|
Generating the treatment layout of a completely randomized (CR) design
Zhanshan Dong
This a small SAS program to generate the treatment layouts of a completely randomized (CR) design. Use any text editor to enter the following program and save it to a file with a file extension ".SAS". Then you can run the program in SAS. You can change the number of treatments (th) and the number of replications (rep) in the program according to your particular needs.
options ps=60 ls=70;
data set1;
do th = 1 to 8;
do rep = 1 to 9;
ran = ranuni(0);
output;
end;
end;
run;
proc sort;
by ran;
run;
proc print;
var th rep ran;
run;
|
|
|
|
© 1998-, 董占山, 版权所有。
转载文章请注明出处(www.sunfinedata.com/articles)。
|