Hello,
I am trying to understand the following code and wondered why two streaminits are used?:
data prior_fl;
call streaminit(4321);
do sample=1 to 10;
call streaminit(1234); /* what are each of the seed for? Is this the seed for the uniform or for the normal random numbers and the above for the prior?*/
p1=RAND('UNIFORM', 0, 1); /*p1 will be a proportion between 0 and 1 each proportion with equal probability*/
if p1<=&weight then do;
lghr=log((&upper-&lower)*rantri(&seed, (&mode-&lower)/(&upper-&lower))+&lower); *add my prior distribution here inside the log;
end;
else do;
lghr=(rand("Normal", 0, 0.00));
end;
truehr=exp(lghr);

obsHR_IA=exp(rand("Normal", lghr, sqrt(4/&ia)));
z_IA=(log(obsHR_IA))/sqrt(4/&ia);

obsHR_FA=exp((&ia/&fa)*log(obsHR_IA) + (1-(&ia/&fa))*rand("Normal", lghr,sqrt(4/(&fa-&ia))));