gravanoc
Active Member
- Joined
- Oct 20, 2015
- Messages
- 351
- Office Version
- 365
- Platform
- Windows
- Mobile
Hi, I'm trying to follow a prescribed model for the spread of infectious disease using the SIR model, but somehow my columns are not summing up to N, which is always supposed to be a constant.
Formula is here: SIR Model
Snapshot of Excel file: Sir.png
Ok t is pretty much just the number of days starting with 0 - 65. The only variability in the overall formula is that when the day/t hits 22 some random factor changes, represented by 0.04663495 and later 0.05498259. In the column S(t) it starts at S(0) = 6,810,005, I(t) starts with I(0) = 94, R(t) starts with R(0) = 1. Next row is where I put the main formula: t is just a constant that increases by 1, S(1) =C4-(IF(B5<=21,$L$5/$H$8,$L$6/$H$8)*C4*D4); I(1) =D4+(C4*D4/$H$8)-(D4/$L$8), R(1)=E4+(D4/$L$8). Those seem to match up exactly to what the formula states, but my N value keeps increasing when it should always remain 6,810,100.
Here are links to a couple files, the first is my failed attempt to calculate: SIR2.xlsx
Next is a link to a file I found on the Internet that accounts for the model in a different way: SIR.xlsx
Help is greatly appreciated!
Formula is here: SIR Model
Snapshot of Excel file: Sir.png
Ok t is pretty much just the number of days starting with 0 - 65. The only variability in the overall formula is that when the day/t hits 22 some random factor changes, represented by 0.04663495 and later 0.05498259. In the column S(t) it starts at S(0) = 6,810,005, I(t) starts with I(0) = 94, R(t) starts with R(0) = 1. Next row is where I put the main formula: t is just a constant that increases by 1, S(1) =C4-(IF(B5<=21,$L$5/$H$8,$L$6/$H$8)*C4*D4); I(1) =D4+(C4*D4/$H$8)-(D4/$L$8), R(1)=E4+(D4/$L$8). Those seem to match up exactly to what the formula states, but my N value keeps increasing when it should always remain 6,810,100.
Here are links to a couple files, the first is my failed attempt to calculate: SIR2.xlsx
Next is a link to a file I found on the Internet that accounts for the model in a different way: SIR.xlsx
Help is greatly appreciated!