Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323751 - values in Incidence_2.csv file don't match with S to E transition calculations
Summary: values in Incidence_2.csv file don't match with S to E transition calculations
Status: CLOSED FIXED
Alias: None
Product: STEM
Classification: Technology
Component: Analysis (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 1.1.2   Edit
Assignee: Stefan Edlund CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-26 15:40 EDT by Traci Arthur-Hartranft CLA
Modified: 2011-07-18 21:41 EDT (History)
1 user (show)

See Also:


Attachments
spreadsheet showing example results; yellow columns are copied from STEM .csv files, others were calculated; red text was expected to match more closely (22.21 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2010-08-26 15:40 EDT, Traci Arthur-Hartranft CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Traci Arthur-Hartranft CLA 2010-08-26 15:40:19 EDT
Created attachment 177558 [details]
spreadsheet showing example results; yellow columns are copied from STEM .csv files, others were calculated; red text was expected to match more closely

This is based on a simple case of a DeterministicSEIRDisease model where there are no changes in population (natural birth and death rate=0), no disease deaths (infectious mortality rate=0) and no movement from R back to S (immunity loss rate=0). 

Incidence is stated to be the transition from S to E in a time step. Given the simple example above, movement from S to E should be constrained to be equal to the reduction in S between time steps. 

But the calculated S to E values can be off by up to 1000 or so from the Incidence file results. A summary is in the attached spreadsheet for a single county where I started with 200 infected people.
Comment 1 Stefan Edlund CLA 2010-08-26 16:35:18 EDT
Assigning to me. The source of the bug is known, will discuss with Jamie when he returns Monday.
Comment 2 Stefan Edlund CLA 2010-08-30 14:05:18 EDT
Incidence is now calculated correctly by summing for each step calculated by integration and resetting the value at the beginning of a new timestep. Previous code was simply doing a finite difference estimation.
Comment 3 James Kaufman CLA 2011-07-18 21:41:42 EDT
Complete