lab:projects:02robust_growth_curve_modeling_using_student-t_distribution:sas_codes
*copy data to the running directory; %MACRO runsim(i); data temp; number = &i; datastr=put(number, 4.); datastrcomp=compress(datastr,''); commd ='cp /pscratch/zzhang4/Private/student-grm/data/folder/DATAN500I'||datastrcomp||'bugs.txt data.txt'; run; data _null_; set temp; file 'cp.sh'; put commd; run; data _null_; X 'chmod 755 cp.sh'; X './cp.sh'; X 'rm -f cp.sh'; run; quit; *copy coda to the results locations; data temp1; r1 = &i; rstr=put(r1, 4.); codar=compress(rstr,''); commd1 = 'mv codaCODAchain1.txt /pscratch/zzhang4/Private/student-grm/CODA/folder/DATACODANcodansI'||codar||'.txt'; run; data _null_; set temp1; file 'coda.sh'; put@1 '/pscratch/zzhang4/Private/OpenBUGS307/bin/OpenBUGS.sh script.txt'; put commd1; put "rm -f data.txt"; put "rm -f codaCODAindex.txt"; put "rm -f cp.sh"; run; data _null_; X 'chmod 755 coda.sh'; X './coda.sh'; X 'rm -f coda.sh'; run; quit; %MEND runsim; %MACRO batch; %LET r=1001; %DO %WHILE (&r <=1100); %runsim(&r); %LET r = %eval(&r+1); %END; %MEND batch; %batch;
lab/projects/02robust_growth_curve_modeling_using_student-t_distribution/sas_codes.txt · Last modified: 2016/01/24 09:48 by 127.0.0.1