Re: Simulation Process and Independent Vs Paired Samples
- From: duncan smith <buzzard@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 28 Apr 2008 16:50:32 +0100
Paul Rubin wrote:
duncan smith wrote:
In the model I'm dealing with there are competing risks. Once a treatment is introduced the patient might embark on a different series of transitions before death. Reducing the risk of transition from state X to state Y might result in a transition to state Z instead. I don't want the time spent in state Y (without treatment) to be correlated with the time spent in state Z (with treatment). (This violates the assumptions of the model.) Even in the case where there's only one possible transition I wouldn't use the same uniform random variate to generate the transition time, because that would imply that every patient would respond positively to the treatment (assuming it is on average effective). That's an assumption I'm not 100% happy with. I prefer the weaker assumption that the hazard is reduced in the same way for each patient, but that the times to transition in the treatment / non-treatment arms of the simulation are independent given the relevant hazard function.
I'll confess that I'm having a bit of trouble parsing this, since I don't have your model to look at. Let's say that Patient X enters the simulation and, at some point, you clone him, so that X continues on to get one treatment and X' gets a different treatment. If there is no medical reason to believe responses to the two treatments would be correlated, then there's no reason to use common random numbers in generating the treatment outcomes.
However, let's say that some characteristics of the patient (age, severity of illness, whether the patient is left-handed) affect both treatment outcomes in similar ways (such as increasing likelihood of transition to the next plane, as it were). If those characteristics are explicit parameters in the hazard function, you can attach them to the patient as attributes and, as each patient (or clone) moves through the model, plug them into the relevant functions. Perhaps not every common causal factor gets picked up as an attribute, though. That's an argument for using common random numbers (with different hazard functions) for patient X and clone X' ... but only when the random numbers are being used to generate outcomes where the common causal factors would indicate common "tendencies" (meaning toward the successful or unsuccessful side of the outcome distribution).
That's pretty much how it works. A patient has attributes contained in a mapping, and sequences of states and durations which are built up during the simulation. Each time a state is visited a callable object is called, which returns the next state and duration. There may be several possible next states, so the callable (internally) generates a transition time for each possibility, and the shortest time indicates the next state and duration in the current state. These are returned and the history is updated. As the patient is passed as an argument to the callable it can use any information contained in the attributes or patient history to date. It could also deal with dependent risks, but again the durations are currently assumed to be independent given the attributes and patient history.
The first time a state is visited where a transition is affected by a treatment the simulation forks. The next transition is "special-cased". The simulation is forked and I only generate distinct durations for possible transitions that are affected by a treatment. The question is how to generate the baseline / treatment pair of durations. At the moment they're generated independently given the attributes and patient history. But the reason a separate callable is made responsible for this is so that I can change this behaviour without needing to change my basic simulation code. What happens subsequently is more difficult to keep a handle on. Even if it's reasonable to use the same transitions / durations for parts of the subsequent histories, the states may well be visited in different orders, so using the same random number stream doesn't cut it. The complexity of trying to pair the simulations after this point is probably not worth it computationally; but it's something I'm still working on.
Duncan
Disclaimer: I'm used to dealing with queueing models. There common random numbers are frequently appropriate. If I'm comparing two possible layouts for a fast food joint, and in simulating the first variant I manage to generate a customer who can't make up his mind and gums up the queue, I want a similar amount of dithering by that customer's clone in the second variant..
/Paul
- References:
- Simulation Process and Independent Vs Paired Samples
- From: Hanspeter
- Re: Simulation Process and Independent Vs Paired Samples
- From: Paul Rubin
- Re: Simulation Process and Independent Vs Paired Samples
- From: Richard Ulrich
- Re: Simulation Process and Independent Vs Paired Samples
- From: duncan smith
- Re: Simulation Process and Independent Vs Paired Samples
- From: Paul Rubin
- Re: Simulation Process and Independent Vs Paired Samples
- From: duncan smith
- Re: Simulation Process and Independent Vs Paired Samples
- From: Paul Rubin
- Simulation Process and Independent Vs Paired Samples
- Prev by Date: Re: Lilliefors Test : 40 years
- Next by Date: Re: Lilliefors Test : 40 years
- Previous by thread: Re: Simulation Process and Independent Vs Paired Samples
- Next by thread: Quantitative research Vs qualitative research?
- Index(es):
Relevant Pages
|