Copyright 2019 by W. B. MacLeod, This file is part of “CM-DoctorSim”.

"CM-DoctorSim" is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

"CM-DoctorSim" is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with "CM-DoctorSim".  If not, see <https://www.gnu.org/licenses/>.
## Initialize R
rm(list = ls()) # clean workspace
library(rmarkdown)
library(stargazer)
library(knitr)
library(tidyverse)
library(entropy)
library(lubridate)

Introduction

This document produces Tables and Figures for the analysis of the simulation data produced by the Julia Code “RunDoctor-v2.jl”.

The code reads in “CM-Sim-v2.md”.

Rendering the file in Rstudio or using “render.sh” in a terminal produces a “CM-Sim-Graphics.html” with figures. Change document type above to get pdf document.

The file “SummaryStats.md” with run parameters is also produced. There code to time stamp this file - see below.

Individual figures are produced by un-commenting the appropriate ggplot lines below.

Overview of the Approach

The data is generated from a Julia simulation with parameters:

Doctor Parameters

Doctor’s Reservation Probability:

  • High Reservation Probability: 0.95
  • Low Reservation Probability: 0.5

Doctor’s Skill = the variance of measurement error in the doctor’s assessment of the patient’s condition:

  • Low: 0.01
  • Medium: 0.1
  • High: 1

Patient Parameters

  • Degree of Complementarity in PolyPharmacy: 0.6. If a treatment consists of two drugs, then we assume that the mean effect is equal to 0.6 times each single drugs effects. Hence, we assume that a combination of two drugs is more likely to be effective than a single drug.

  • Idiosyncratic Variance in PolyPharmacy: 0.01. If a treatment consists of two drugs, the variance of the treatment is assumed to be (the sum of the variances times 0.6**2) plus this term capturing idiosyncratic variance.

  • Number of Patients per Doctor: 300, where all patients of each doctor are drawn from the same distribution.

Simulation Parameters

  • Months of Treatment: 36

  • Number of Simulation Runs: 100

Below there are two summaries of the simulation results. The first takes means over the all types over all treatments.
The second shows the outcomes over time.

Overall Mean Results Over All Periods

In this section we summarize over all periods to see how physician characteristics affect mean performance. Physicians vary in terms of skill and reservation probabilities and operate either with or without guidelines. Here we assume that the regime without guidelines allows polypharmacy.

## 
## ===========================================================
##        Dstyle        Dqual     Poly meanE meanU meanO meanP
## -----------------------------------------------------------
## 1  High Res Probs  High Skill   No  0.453 0.345 0.545   0  
## 2  Low Res Probs   High Skill   No  0.381 0.300 0.500   0  
## 3  High Res Probs  High Skill  Yes  0.507 0.262 0.233 0.744
## 4  Low Res Probs   High Skill  Yes  0.515 0.200 0.157 0.744
## 5  High Res Probs Medium Skill  No  0.322 0.195 0.425   0  
## 6  Low Res Probs  Medium Skill  No  0.367 0.193 0.417   0  
## 7  Low Res Probs  Medium Skill Yes  0.468 0.142 0.129 0.744
## 8  High Res Probs Medium Skill Yes  0.396 0.121 0.169 0.744
## 9  Low Res Probs   Low Skill    No  0.225 0.114 0.380   0  
## 10 High Res Probs  Low Skill    No  0.058 0.108 0.383   0  
## 11 Low Res Probs   Low Skill   Yes  0.433 0.103 0.115 0.744
## 12 High Res Probs  Low Skill   Yes  0.097   0   0.141 0.744
## -----------------------------------------------------------

Comments

These simulations suggest that although polypharmacy has the potential to lead to better patient outcomes (and indeed the simulation is set up so that a combination of drugs is more likely to be optimal than a single drug), allowing two drug combinations does not improve outcomes in the shorter term.

Performance over Time

This section explores simulations exploring how doctor skill and reservation probabilities
affect performance over time. Here performance is defined in terms of doctor utility, which is given by the number of times that the patient receives a sub-optimal treatment. Consider first the issue of how reservation probability affects performance over time for physicians follow guidelines.

Since all doctors in our model are trying to do the best they can given their skill, increasing entropy over time can be interpreted as a measure of improved matching between treatments and patients. Entropy rises over time as doctors learn about the optimal drug choice for each patient, and patient outcomes improve.

With polypharmacy, the doctor has more possible choices, and so finding the optimum is slower. These simulations show a case in which patient outcomes are worse in the short run in the poly- pharmacy case (i.e. without guidelines), because of these search costs.

                                    # Doctor Prescription Dispersion over Time
Etime.plt

## Uncomment the next line to get pdf of entropy graph.
## ggsave(paste0("E-56-3-years", now, ".pdf"), plot = Etime.plt ,width = 7.5, units = "in" )