/* enter the following */ hfile="sima"; /* investigator's simulation file */ simout="client"; /* client's simulation file (output) */ /* do not write anything below */ let LDPAR=250; output file=^simout reset; load in[]=^hfile; niter=in[1]; npar=in[2]; if not (rows(in) == (niter*(4+npar) + 2)); print " Error in simulation input file line 1 or unexpected end of file reached at line " (niter*npar +2) " or some of the data is not numeric \n"; end; endif; if ((niter<=0) or (npar <= 0)); print "Illegal first record of input simulation file" hfile niter npar; endif; if (npar > LDPAR); print "input simulation file " hfile npar " parameters exceed limit of " LDPAR; endif; /* First pass */ k=3; jter=0; wtlog=0; pri=0; pdat=0; thetai=zeros(1,npar); nc=0; priorc=0; gc=0; for iter (1,niter,1); call readrec; call client; if (iter == 1); if ((nc<0) or (nc > LDPAR)); print "Clients function of interest " nc "not in range 1 to " LDPAR; end; endif; format /rdn 16,0; print niter;; print nc; endif; wtlog=wtlog+priorc-pri; pri=priorc; call writerec(iter); endfor; /* iter */ end;