zward / Amua

An open source modeling framework
GNU General Public License v3.0
33 stars 11 forks source link

Adding multiple complications to decision tree model #63

Open DBogers opened 1 year ago

DBogers commented 1 year ago

Hi, I want to add multiple complications, each with a probability of getting it or not, to my decision tree model. I tried doing it by just branching it, but then it does not sum up to 1, because each of the 3 complications has its own risk and I don't know the overall probability of getting a complication. How can I add multiple complications?

zward commented 1 year ago

By multiple complications, do you mean: A: Each patient faces the risk of 3 but only gets 1 (i.e. mutually exclusive, in which case you can branch them all off of 1 chance node and use 'C' to fill in the complementary probability of not having any complication - this will ensure that they sum to 1.0, as long as the sum of all 3 complication probabilities is <1.0) or B: Each patient could have more than 1 complication (i.e. not mutually exclusive, in which case you would need a more complicated structure - or have branches to capture all of the different combinations of complications)

DBogers commented 1 year ago

Hi Zach, Option B is the case yes. So that means that for every complication I should make a branch for getting/not getting the complication?

zward commented 1 year ago

I think you need to have multiple branches coming off 1 chance node to capture all of the possible combinations. Assuming the complications are independent you could have: 1 branch for each of the complications (A, B, C) = 3 1 branch for each joint event of 2 complications, where the probabilities of each complication are multiplied (A+B, A+C, B+C) = 3 1 branch for the joint event of all 3 (A+B+C)=1 No complications = 1 Total = 8 branches