From 5a1f2713224f58c7bfea966743c2b59163cd5260 Mon Sep 17 00:00:00 2001 From: Anastasis Georgoulas Date: Tue, 14 Sep 2021 15:41:25 +0100 Subject: [PATCH] Set the seed to reproduce runs --- hiv_synthesis.sas | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hiv_synthesis.sas b/hiv_synthesis.sas index 9427cf95..d0cc726b 100644 --- a/hiv_synthesis.sas +++ b/hiv_synthesis.sas @@ -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)); @@ -986,6 +989,8 @@ drop i; data r1; set r1; +* for reproducing a run; +call streaminit(10); %sample_uniform(gender, 1 2); @@ -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;