From: Jacob B. <jac...@gm...> - 2017-05-27 15:51:03
|
So Lucian, What you are pointing out may be exactly what I need. I need events that use the same instruction line which is in the trigger to fire in random order. The randomness is important since it allows situations where a person has an MI before a Stroke or a Stroke before an MI where both events have their own probability. I was hoping to handle it later on by assigning priority a random number - for now it is not that important - and for debug purposes, I need something I can follow - the code is convoluted enough. By the way, do you want to be in the discussion where I send code to Leandro? You were very helpful so far. Yet you have a good point that we will revisit - please remember it and raise it again in a few weeks. It will help me remember. Jacob On Sat, May 27, 2017 at 10:45 AM, Jacob Barhak <jac...@gm...> wrote: > So Lucian, > > Leandro, asked to discontinue the old thread due to length, so I am > creating a new thread with new title . > > > > Jacob > > On Fri, May 26, 2017 at 3:19 PM, Lucian Smith <luc...@gm...> > wrote: > >> One note: >> >> On Thu, May 25, 2017 at 1:03 PM, Leandro Watanabe <lea...@gm...> >> wrote: >> >>> If you leave priority out, then it is equal probability (50 50 in this >>> case) of firing each. >>> >> >> This is not true: in the absence of priorities, simulators may use any >> method they wish to determine which event fires first. Some use 'the order >> the event appears in the document', so would always fire event E1 before >> event E2. In order to ensure a 50:50 probability, the 'priority' attribute >> must exist, and be the same for both events. >> >> This means that your example, where both priorities are draws from the >> same distribution, is functionally equivalent to giving both priorities the >> same value, which is probably simplest. >> >> If you want one event to preferentially fire, you can give them different >> distributions. As an example: >> >> E1 priority: uniform(0,1) >> E2 priority: uniform(0,2) >> >> will preferentially execute event E2 75% of the time, as a draw from >> uniform(0,2) will be greater than a draw from uniform(0,1) 75% of the time. >> >> -Lucian >> > > |