modelling issue
modelling issue
Hello,
I would need your help for a modelling issue I have.
I need to model the impact of a delay on four fractions. (obviouly the sum of the 4 fractions is 1)
These fractions are influenced by one delay. The longest the delay, the smaller the first fraction, and the bigger the other ones.
For the impact of the delay I wanted to use a look up function, as I dispose of minimum, reference and maximum points. The trouble is to model this impact on the four fractions while ensuring that their sum will always equal 1.
Is that clear? Do you have any idea on how to address this?
I would need your help for a modelling issue I have.
I need to model the impact of a delay on four fractions. (obviouly the sum of the 4 fractions is 1)
These fractions are influenced by one delay. The longest the delay, the smaller the first fraction, and the bigger the other ones.
For the impact of the delay I wanted to use a look up function, as I dispose of minimum, reference and maximum points. The trouble is to model this impact on the four fractions while ensuring that their sum will always equal 1.
Is that clear? Do you have any idea on how to address this?
-
- Super Administrator
- Posts: 4842
- Joined: Wed Mar 05, 2003 3:10 am
Introduce a couple of auxiliary variables. Eg.
Sum of fractions = fraction 1 + fraction 2 + fraction 3 + fraction 4
adjusted Fraction 1 = fraction 1 / Sum of fractions
adjusted Fraction 2 = fraction 2 / Sum of fractions
adjusted Fraction 3 = fraction 3 / Sum of fractions
adjusted Fraction 4 = fraction 4 / Sum of fractions
This will make the sum of "adjusted fraction n" = 1.
Hope this helps.
Tony.
Sum of fractions = fraction 1 + fraction 2 + fraction 3 + fraction 4
adjusted Fraction 1 = fraction 1 / Sum of fractions
adjusted Fraction 2 = fraction 2 / Sum of fractions
adjusted Fraction 3 = fraction 3 / Sum of fractions
adjusted Fraction 4 = fraction 4 / Sum of fractions
This will make the sum of "adjusted fraction n" = 1.
Hope this helps.
Tony.
doesn't work
The adjusted fractions idea doesn't work... or I didn't get what you mean, Tony.
I would need a possibility to model the impact of a delay factor through four lookups, while controlling that the sum of the fractions = 1 (and I don't get negative values for extreme conditions)
I would need a possibility to model the impact of a delay factor through four lookups, while controlling that the sum of the fractions = 1 (and I don't get negative values for extreme conditions)
-
- Super Administrator
- Posts: 4842
- Joined: Wed Mar 05, 2003 3:10 am
-
- Super Administrator
- Posts: 4842
- Joined: Wed Mar 05, 2003 3:10 am
Tony, the suggested adjustement of the fraction does not allow to control for errors in my fractions.. a 10% error in a fraction or other may have an important impact...
So I need to find another way of modelling this. And the easiest would be to use lookups impacts and determining the first fraction, then the group of the other three remaining fractions, the excluding the second fraction, and the last one would be 1- the last one, which should guarantee the sum being =1 and avoid negative values...
What do you think?
Thanky, have a good week
So I need to find another way of modelling this. And the easiest would be to use lookups impacts and determining the first fraction, then the group of the other three remaining fractions, the excluding the second fraction, and the last one would be 1- the last one, which should guarantee the sum being =1 and avoid negative values...
What do you think?
Thanky, have a good week
Hello,
Ok, sorry...
So basically I'm trying to model the evolution of a disease depending on time to diagnosis(TD). Depending on TD people will be diagnosed with four type of disease...
I would use table functions to model the effect of TD on the four fractions of patients. (I have values for the reference case, min and max, the reference values of the fractions are f1=0.5, f2=0.3, f3=15 and f4=0.05, refrence TD=3)
What do you think? Am I clear enough? Thanks!
Ok, sorry...
So basically I'm trying to model the evolution of a disease depending on time to diagnosis(TD). Depending on TD people will be diagnosed with four type of disease...
I would use table functions to model the effect of TD on the four fractions of patients. (I have values for the reference case, min and max, the reference values of the fractions are f1=0.5, f2=0.3, f3=15 and f4=0.05, refrence TD=3)
What do you think? Am I clear enough? Thanks!
Hi
No, it is not clear, at least for me.
<So basically I'm trying to model the evolution of a disease depending on time to diagnosis(TD
This is clear.
< Depending on TD people will be diagnosed with four type of disease...
This is not clear.
Are there four types of disease, or four TD, eventually depending on four type of patients?
Regards.
JJ
No, it is not clear, at least for me.
<So basically I'm trying to model the evolution of a disease depending on time to diagnosis(TD
This is clear.
< Depending on TD people will be diagnosed with four type of disease...
This is not clear.
Are there four types of disease, or four TD, eventually depending on four type of patients?
Regards.
JJ
Hello,
then sorry again.
the reference value TD =3 implies the reference values for the fractions of patients (given previously)
If TD > < 3, the fractions are modified (a longer TD implies a smaller f1 and a bigger f4; a shorter delay TD implies a smaller f1 and a bigger f4)
There are four type of commorbidities (let's say four diseases) depending on one TD. My aim is to test the effect of varying the TD on the further development of the disease- and implicitly costs...
Is this more clear?
Thank you?
then sorry again.
the reference value TD =3 implies the reference values for the fractions of patients (given previously)
If TD > < 3, the fractions are modified (a longer TD implies a smaller f1 and a bigger f4; a shorter delay TD implies a smaller f1 and a bigger f4)
There are four type of commorbidities (let's say four diseases) depending on one TD. My aim is to test the effect of varying the TD on the further development of the disease- and implicitly costs...
Is this more clear?
Thank you?
modelling issue
Hi
The problem is that you mix the problem with the solution, when explaining the case. It makes things difficult to understand.
The other problem is that you expect people on this forum to have the same knowledge as you in epidemiology.
You must give a full explanation of the problem.
I will try to reformulate your problem.
And another problem is that you think that one can use SD without a minimum of knowledge, that you do not seem to have.
The proof is that you produce a model with dimension errors.
You should study the Vensim user guide, deeply.
The problem seems to be to find the adequate time to diagnose TD. Am I right. A longer time spent to diagnose is more expensive?
If one spends 3 unit of time (years, months,weeks, days?) one has the four factions?
But what does these fractions represent?
Does it mean that if one has spent 3 (what time units?) of work, 0.5 of the people having the first disease will be discovered, 0.3 from the second, 0.15 from the third and 0.05 from the fourth?
But in this case, why are the sum of the fraction equal to 1.
Another explanation may be that if one spends 3 time units of work, on one case, one will discover a first disease with a probability of 50%, the second one 30% etc..?
If one works trying to discover any disease, is the kind of work the same?
For instance trying to find the first disease, might need a different technique than trying to find the second one?
I want to explain you that your explanation is, at least for me, not clear at all.
One solution might be to simplify your problem, and for instance consider, only one disease, formulate the problem in this case, (it will be much easier) and try to model it (easier too) and then try to consider two diseases. Simplifying does not hurt anyone. A model is always a simplification of the reality, and what is the use of a model very close to the reality but complex, if you do not understand how it works? You may too simplify other things in your problem.
One must be careful if one narrows the model boundaries, wanting to simplify the model, it may destroy fundamental dynamics.
It is to my opinion the last thing to simplify, if necessary.
Regards.
JJ
The problem is that you mix the problem with the solution, when explaining the case. It makes things difficult to understand.
The other problem is that you expect people on this forum to have the same knowledge as you in epidemiology.
You must give a full explanation of the problem.
I will try to reformulate your problem.
And another problem is that you think that one can use SD without a minimum of knowledge, that you do not seem to have.
The proof is that you produce a model with dimension errors.
You should study the Vensim user guide, deeply.
The problem seems to be to find the adequate time to diagnose TD. Am I right. A longer time spent to diagnose is more expensive?
If one spends 3 unit of time (years, months,weeks, days?) one has the four factions?
But what does these fractions represent?
Does it mean that if one has spent 3 (what time units?) of work, 0.5 of the people having the first disease will be discovered, 0.3 from the second, 0.15 from the third and 0.05 from the fourth?
But in this case, why are the sum of the fraction equal to 1.
Another explanation may be that if one spends 3 time units of work, on one case, one will discover a first disease with a probability of 50%, the second one 30% etc..?
If one works trying to discover any disease, is the kind of work the same?
For instance trying to find the first disease, might need a different technique than trying to find the second one?
I want to explain you that your explanation is, at least for me, not clear at all.
One solution might be to simplify your problem, and for instance consider, only one disease, formulate the problem in this case, (it will be much easier) and try to model it (easier too) and then try to consider two diseases. Simplifying does not hurt anyone. A model is always a simplification of the reality, and what is the use of a model very close to the reality but complex, if you do not understand how it works? You may too simplify other things in your problem.
One must be careful if one narrows the model boundaries, wanting to simplify the model, it may destroy fundamental dynamics.
It is to my opinion the last thing to simplify, if necessary.
Regards.
JJ
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
It is a little bit hard to understand exactly what you are trying to do, but from your description neither fractions nor Lookups sound like the solution. Rather you might be better off thinking of this as an aging chain - with people contracting some disease or condition into a pool of undiagnosed, then a pool of diagnosed, then a pool or cured or in treatment. With co-morbidity this does become tricky so you will need to make some assumptions on that, but this would be represented as flows out of the levels based on rates for other conditions.
Hello,
thank you JJ and Bob for you answers.
This problem is only a very small part of my model. Indeed I used an aging chain; the four fractions were needed for the flows out of the undiagnosed stock. The effect of TD on the four fractions may be explained as: the faster the main disease is diagnosed, the commorbidities onset will be slown down, which means we will have more people in the first fraction (initial stage), and less in the others stages (medium to severe stage). I didn't consider it necessary to exlain it all in detail...
By the way, I have SD knowledge and have read Vensim user guide... I thought as you are the experts and used to this kind of questions, a general explanation of my problem would suffice. My fault.
Thank you again, best regards
thank you JJ and Bob for you answers.
This problem is only a very small part of my model. Indeed I used an aging chain; the four fractions were needed for the flows out of the undiagnosed stock. The effect of TD on the four fractions may be explained as: the faster the main disease is diagnosed, the commorbidities onset will be slown down, which means we will have more people in the first fraction (initial stage), and less in the others stages (medium to severe stage). I didn't consider it necessary to exlain it all in detail...
By the way, I have SD knowledge and have read Vensim user guide... I thought as you are the experts and used to this kind of questions, a general explanation of my problem would suffice. My fault.
Thank you again, best regards
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
If you have diagnoses times on the outflows from levels it seems like that should be enough. Splitting up a level into fractional components is something that would need to be done only if there were constraints on the resources available to perform the diagnosis, and even this can often be done by directly observing the level. For example
diagnosis condition 1 = MIN(diagnosis capacity 1, undiagnosed patients with condition 1/minimum time to diagnose condition 1)
and the same for other conditions. This would need to be further constrained only if the comorbitity is such that taking people out of the condition 1 pool might completely empty the condition 2 pool. That case would take a little more thought. Perhaps that is what you are struggling with?
diagnosis condition 1 = MIN(diagnosis capacity 1, undiagnosed patients with condition 1/minimum time to diagnose condition 1)
and the same for other conditions. This would need to be further constrained only if the comorbitity is such that taking people out of the condition 1 pool might completely empty the condition 2 pool. That case would take a little more thought. Perhaps that is what you are struggling with?
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
There are a number of solutions I have seen or heard about for comorbitity issues, but I am no sure that any have actually been published. The simplest approach I can think of is to assume that the contraction of the conditions are independent. Then you have
contracting condition[category] = total population * fractional contraction rate[category]
and then
undiagnosed condition[category] = INTEG(contracting condition[category] - diagnosing condition[category] - removal from diagnosis pool[category]
where
removal from diagnosis pool[category] = (total diagnosing - diagnosing condition[category])*fraction undiagnosed in category[category]
total diagnosing = SUM(diagnosing condition[category!])
fraction undiagnosed in category[category] = fractional contraction rate[category]/total fractional contraction rate
total fractional contraction rate - SUM(fractional contraction rate[category!])
If the model is continuous, you don't need to worry about anything going negative in this case. If the model is not continuous, you need to constrain diagnosing condition[category] - probably in a 2 stage formulation using the removal from diagnosis pool[category] to look ahead to what the value for undiagnosed condition[category] would be.
That is the simplest approach I can think of, and even it is pretty complicated. Another approach is to allow 2 condition comorbidity, but assume no 3 condition occurrence. In this case there is a comorbilitycontraction matrix and you can actually track the undiagnoed populations against that matrix. In this case you need to decide is undiagnosed condition[category1,category2] is the same as undiagnozed condition[category2,category1] in which case you only need to track the upper or lower diagonal (yes this is messy).
contracting condition[category] = total population * fractional contraction rate[category]
and then
undiagnosed condition[category] = INTEG(contracting condition[category] - diagnosing condition[category] - removal from diagnosis pool[category]
where
removal from diagnosis pool[category] = (total diagnosing - diagnosing condition[category])*fraction undiagnosed in category[category]
total diagnosing = SUM(diagnosing condition[category!])
fraction undiagnosed in category[category] = fractional contraction rate[category]/total fractional contraction rate
total fractional contraction rate - SUM(fractional contraction rate[category!])
If the model is continuous, you don't need to worry about anything going negative in this case. If the model is not continuous, you need to constrain diagnosing condition[category] - probably in a 2 stage formulation using the removal from diagnosis pool[category] to look ahead to what the value for undiagnosed condition[category] would be.
That is the simplest approach I can think of, and even it is pretty complicated. Another approach is to allow 2 condition comorbidity, but assume no 3 condition occurrence. In this case there is a comorbilitycontraction matrix and you can actually track the undiagnoed populations against that matrix. In this case you need to decide is undiagnosed condition[category1,category2] is the same as undiagnozed condition[category2,category1] in which case you only need to track the upper or lower diagonal (yes this is messy).
Thank you so much Bob! I didn't know if this has already been done and published, and ofcourse I want to avoid publishing something that has already been done, maybe in a more elegant way...
I wanted exactly to constrain the diagnosing pool... I did that in 2 steps. So it should work...
As for using the matrix, that dosn't work... the UDcondition [c1,c2] do not match [c2,c1]
Thank you again!!!
I wanted exactly to constrain the diagnosing pool... I did that in 2 steps. So it should work...
As for using the matrix, that dosn't work... the UDcondition [c1,c2] do not match [c2,c1]
Thank you again!!!