resplab / epicR

R package for the Evaluation Platform in COPD (EPIC), an agent-based whole-disease model for projection of health and economic outcomes and COPD interventions.
11 stars 11 forks source link

urgent: epicR fev1_rate constant for all ppl #61

Closed aminadibi closed 6 years ago

aminadibi commented 6 years ago

Cget_all_events_matrix reports the same value of fev1 rate of decline for (almost) all individuals with COPD!

aminadibi commented 6 years ago
      //Setting values for COPD prevalence cases
      (*ag).weight_baseline = (*ag).weight;
      (*ag).age_baseline = (*ag).local_time + (*ag).age_at_creation;
      (*ag).followup_time = 0 ;
      (*ag).local_time_at_COPD = (*ag).local_time;
      (*ag).fev1_baseline = (*ag).fev1;

has to move to right after:

if(rand_unif()<COPD_odds/(1+COPD_odds)) and

  void event_COPD_process(agent *ag)
  {

except for (*ag).fev1_baseline = (*ag).fev1; which should be set after baseline fev1 is calculated.