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

Updating FEV1 equations per Shahzad's new derivation. #13

Closed aminadibi closed 7 years ago

aminadibi commented 7 years ago

FEV1 equations to be updated and matched in both EPIC-POHEM and epicR.

aminadibi commented 7 years ago

@shahzadg I currently have the following equations for predicting FEV1 and FEV1 decline:

Coefficients for calculation of predicted FEV1 based on individual characteristics:

  input$lung_function$pred_fev1_betas_by_sex<-cbind(
    male=c(intercept=-2.06961, age=-0.03167, height=0.04215*100, reserved=0),
    female=c(intercept=-1.68697, age=-0.02773, height=0.03557*100, reserved=0))

Regression equations (mixed-effects model) for rate of FEV1 decline:

input$lung_function$dfev1_betas<-t(as.matrix(c(intercept=-0.04,sex=0,age0=0,fev1_0=0,smoking=-0.0,time=-0)))

SD of random-effect terms in the mixed-effects model of FEV1 decline:

input$lung_function$dfev1_re_sds<-t(as.matrix(c(intercept=0.01,time=0)))

and Correlation coefficient between random-effect terms in the mixed-effects model of FEV1 decline:

input$lung_function$dfev1_re_rho<--0.5

Let me know if any of these needs to be updated. Cheers!

shahzadg commented 7 years ago

You need to calculate yy_COPD first yy_copd = ((intercept + 2.31*(age_base)+(sex == MALE)*(-8.86)+0.15*gMass_kg_base+74.13*(gHeight_m)+11.39*(gHeight_m)*(gHeight_m)+ (smoking_status3 == SMOKING_STATE3_CURRENT)*(-25.79) +(-0.92)*(gHeight_m)*(gHeight_m)*(age_base)+(-0.44)*time_with_copd)*0.001);

We need to meet and talk about intercept in the equation. It comes from a conditional bivariate normal distribution. Also you need to make sure that age and mass in the equation are basically the values at the time of incidence for COPD incidence and at the creation time for COPD prevalence.

Then fv from the following equation

double fv= FEV1(base line value)+(yy_copd*time_with_copd);

shahzadg commented 7 years ago

For intercept, we need to calculate every terms in FEV1 using CMAJ paper except intercept

  { FEV1_base_cmaj= (sex==MALE ) ? (-5.19*(age_base)+462.5-0.11*gMass_kg_base-1760.3*(gHeight_m)+1893.1*(gHeight_m)*(gHeight_m)+(smoking_status3 == SMOKING_STATE3_CURRENT)*(-77.22)-8.2*(age_base)*(gHeight_m)*(gHeight_m))*0.001:

(-5.19*(age_base)-0.11*gMass_kg_base-1760.3*(gHeight_m)+1893.1*(gHeight_m)*(gHeight_m)+(smoking_status3 == SMOKING_STATE3_CURRENT)*(-77.22)-8.2*(age_base)*(gHeight_m)*(gHeight_m))*0.001;

Then calculate the difference between FEV1 (CMAJ ) and FEV1 (CANCOLD). The difference is used to estimate the intercept in the equation of rate of decline from a conditional bivariate distribution. Please see the attached file. Bivariate_conditional_expectation_Zafar_CanCOLD.docx

aminadibi commented 7 years ago

Addressed in v6.0.0