Replies: 1 comment
-
Is there a way to strike a balance between the two?I don't think Excel is the perfect approach to modelling health states, for a few reasons.
This is why we've been creating botechWe're trying to create a protocol that balances the benefits of Excel, with the need to handle complexity (and visualise it simply). I don't think we've done it perfectly yet, but it is at the point where I use the tool every day to build models, rather than Excel. This isn't necessarily true of costing, and so we are searching for a good way to harmonise both approaches. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Moving from Excel imposes very large costs
In health, when making models, there are three main options you have: Excel, Code and Something Else.
The mistake I see modellers making, is moving from Excel to Code without very good reasons.
What is Code?
We are all familiar with Excel, so I don't need to explain it, but allow me to make a comparison.
![image](https://private-user-images.githubusercontent.com/24748959/327640995-359824aa-afca-484b-839a-ef7f135f7e5c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk2MjUyMzMsIm5iZiI6MTczOTYyNDkzMywicGF0aCI6Ii8yNDc0ODk1OS8zMjc2NDA5OTUtMzU5ODI0YWEtYWZjYS00ODRiLTgzOWEtZWY3ZjEzNWY3ZTVjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDEzMDg1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFjZmRhODVjMDhhOTBjODQwMTUyZjJmNjk5ZjQ1Y2ExMzcwMjY1MWI5NDQ2OGM0YzE5YzZjNDZhZTBlZjNkYzcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pY3en62Z8BeF-ON3smmjXOYOjdLKaS0AnLwQMZc5vlc)
Here's the world's simplest Excel Model, showing the cost of treating incident cases of some disease each year.
Although you can't see the calculations directly, you can sense what is going on: we're multiplying values like population, against rates and costs.
Here's equivalent code, in Python, might be something like this:
If this code was written in a file called
simple_model.py
, we could run it, and get a response:python simple_model.py > The Cost of Treatment is: 5511000.00
Great! This is very simple, and we can clearly see what is going on. We can now call ourselves "programmers" too, an added bonus.
And now you - the reader - has also read and correctly interpreted Python code too, well done.
Now you basically understand what code is, for our purposes at least: code is some set of instructions for the computer, which can hold values (as variables, e.g.
population
) and make calculations. It takes inputs, and produces outputs.Code is generally less interpretable
Now, let me obfuscate the same script we wrote above:
This script does exactly the same thing as above.
We can still make out the constants (e.g. POPULATION, INCIDENCE_RATE), but what on earth is that
calc_cost
function? What is it doing? It's now moved from something we can all understand, to something that the programmer can understand. Meanwhile, even when Excel is confusing, it's still reasonably straightforward to trace the steps that produced the output.Even more importantly, I introduced a mistake into that code above. It now just adds the values together, rather than multiplying them. But because we haven't written any tests for the code, we may not notice it immediately. So, what did we gain from writing out such an eloquent piece of code?
Why do people move from Excel to Code?
Here's a list of reasons that modellers may want to move from Excel to Code
Some are reasonable, some are clearly unreasonable.
While silly, these reasons are not often strongly considered before a project starts.
Beta Was this translation helpful? Give feedback.
All reactions