simcausal icon indicating copy to clipboard operation
simcausal copied to clipboard

Default values for non-existing time-points

Open osofr opened this issue 10 years ago • 0 comments

Allow non-existing time-point references to default to some value, for example, instead of doing this

node("TI", t=0:7, distr="rbern", prob=plogis(-5 - 0.3*CVD + 0.5*A1C[t] + 1.5*{if (t==0) {0} else {TI[t-1]}}))

write just this, with TI[t-1] at t=0 defaulting to 0:

node("TI", t=0:7, distr="rbern", prob=plogis(-5 - 0.3*CVD + 0.5*A1C[t] + 1.5*TI[t-1]))

osofr avatar Sep 19 '15 17:09 osofr