Skip to content

Commit

Permalink
Set the seed to reproduce runs
Browse files Browse the repository at this point in the history
  • Loading branch information
ageorgou committed Sep 14, 2021
1 parent 9aa5cc0 commit 5a1f271
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions hiv_synthesis.sas
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ One row of data defined, containing parameter values that remain fixed for the

data z;

* for reproducing a run;
call streaminit(5);

run = rand('uniform')*1000000000; run=round(run,1);

dataset_id=trim(left(run));
Expand Down Expand Up @@ -986,6 +989,8 @@ drop i;

data r1; set r1;

* for reproducing a run;
call streaminit(10);

%sample_uniform(gender, 1 2);

Expand Down Expand Up @@ -16565,6 +16570,9 @@ drop i;

data r&da2; merge r&da1 s ;

* for reproducing a run;
call streaminit(&e);

* these variables below need creating so that can use t_ version in main code and then use s_ in the sum statments - sum statements need the sum
variable not to exist in the data set;

Expand Down

0 comments on commit 5a1f271

Please sign in to comment.