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

Case detection added to diagnosis equation #96

Closed KateJohnson closed 5 years ago

KateJohnson commented 5 years ago

Only a placeholder for now. The OR should be from the effectiveness of a case detection method (can be from SN and SP).

KateJohnson commented 5 years ago

Get ORs of diagnosis for case detection methods

For every patient in CanCold: p * x = y p = predicted probability from logistic regression x= OR for the effect of case detection on diagnosis mean(y)= sensitivity of case detection method

KateJohnson commented 5 years ago

The sensitivity and specificity of 4 case detection methods are defined in EPIC:

input$values$diagnosis$case_detection_methods None CDQ195 CDQ165 FlowMeter FlowMeter_CDQ [1,] 0 0.4742 0.6069 0.5676 0.5366 [2,] 0 0.1858 0.4115 0.0735 0.0134

To change the case detection method during the model run, change the inputs as follows:

input <- init_input()

input$values$diagnosis$logit_p_diagnosis_by_sex <- cbind(male=c(intercept=-5, age=-0.0324, smoking=0.3711, fev1=-0.8032, gpvisits=0.0087, cough=0.208, phlegm=0.4088, wheeze=0.0321, dyspnea=0.722, case_detection=input$values$diagnosis$case_detection_methods[1,"CDQ195"]), female=c(intercept=-5-0.4873, age=-0.0324, smoking=0.3711, fev1=-0.8032, gpvisits=0.0087, cough=0.208, phlegm=0.4088, wheeze=0.0321, dyspnea=0.722, case_detection=input$values$diagnosis$case_detection_methods[1,"CDQ195"]))