The purpose of this analysis is to see if the physician liasons’ contact rate is affected when we applied to a customized call plan compared to a flat 15 calls across the board.
We start with loading library and dataset in R studio.
#Load necessary library
library(dplyr)
library(readr)
library(ggplot2)
library(plotly)
#Load Data
ContactRate <- read_csv("Contact Rate Analysis.csv")
ContactRate<- subset(ContactRate, ContactRate <=1)
The data is from the 6501 report, which contains PL name, # of calls per day, # of contacts met per day and contact rate. A region column has been added to view contact rate by geography.
The number of calls required for each PL increased to 15 per day starting from 6/1/2016 through 9/30/2016 (4 months). As of 10/1/2016, a customized call plan has been implemented. Physician liasons are doing 10, 12 or 13 calls per day based on the density of accounts and radius of a certain territory.
Group A below represents contacts between 6/1/2016 and 9/30/2016 and Group B below represents contacts between 10/1/2016 and 2/28/2017.
DT::datatable(ContactRate,options = list(pagelength = 100))
Below is a summary including the statistics of the dataset;
summary(ContactRate)
## FullName Date Visits ContactsMet
## Length:7262 Length:7262 Min. : 1.00 Min. : 0.000
## Class :character Class :character 1st Qu.:12.00 1st Qu.: 5.000
## Mode :character Mode :character Median :13.00 Median : 6.000
## Mean :13.61 Mean : 5.823
## 3rd Qu.:15.00 3rd Qu.: 7.000
## Max. :32.00 Max. :18.000
## ContactRate Group Region CallBucket
## Min. :0.0000 Length:7262 Length:7262 Length:7262
## 1st Qu.:0.3600 Class :character Class :character Class :character
## Median :0.4100 Mode :character Mode :character Mode :character
## Mean :0.4292
## 3rd Qu.:0.5000
## Max. :1.0000
A boxplot is used to visulize the data. Below is an example of a box plot.
Definitions
Median: The median (middle quartile) marks the mid-point of the data and is shown by the line that divides the box into two parts. Half the scores are greater than or equal to this value and half are less.
Inter-quartile range: The middle “box” represents the middle 50% of scores for the group. The range of scores from lower to upper quartile is referred to as the inter-quartile range. The middle 50% of scores fall within the inter-quartile range.
Upper quartile: Seventy-five percent of the scores fall below the upper quartile.
Lower quartile: Twenty-five percent of scores fall below the lower quartile.
Whiskers: The upper and lower whiskers represent scores outside the middle 50%. Whiskers often (but not always) stretch over a wider range of scores than the middle quartile groups.
Outliers: Points outside the whiskers, which is either greater or smaller than 1.5 Inter-quartile range
plot_ly(ContactRate,y= ~ContactRate,color = ~Group, type = "box")%>%
layout(title = "Contact Rate Comparison",
xaxis=list(title = "Group"),
yaxis=list(title = "Contact Rate"))
Seen in the boxplot above, group B has a higher median contact rate (42%) than group A (40%). Also group B is more likely to reach a higher contact rate because the upper whisker is higher at 71% compared to group A at 63%. Therefore, by customizing the # of calls for each PL, a higher contact rate is anticipated.
plot_ly(ContactRate, x = ~Region, y = ~ContactRate, color = ~Group, type = "box") %>%
layout(boxmode = "group",
xaxis=list(title = "Region"),
yaxis=list(title = "Contact Rate"),
title = "Contact Rare Comparison by Region")
The boxplot above shows a break down of group A and group B by region. Switching to a customized call plan presents greater results (better contact rate) for the newer,widespread regions (AL, IN) whereas slight/flat results are presented in the denser, established regions (MDN, NJS,VAN).
plot_ly(ContactRate,y= ~ContactRate,color = ~CallBucket, type = "box")%>%
layout(title = "Contact Rate Comparison by Call Bucket",
xaxis = list(title ="Call Bucket"),
yaxis = list(title = "Contact Rate"))
From the boxplot above, at 15 calls per day, the medium contact rate is 40%. For the regions that require a lower number of calls, like Indiana, Michigan and Alabama, by dropping the number of calls per day, more effective calls are completed (higher contact rate). The median contact rate for 10, 12 and 13 calls is 0.48,0.42 and 0.42 respectively.
The last step is to perform ANOVA test to see if the difference in median we saw on the box plot is statistically significant. The output below shows the F value and P value.
result <- aov(ContactRate~CallBucket,data = ContactRate)
summary(result)
## Df Sum Sq Mean Sq F value Pr(>F)
## CallBucket 3 1.34 0.4472 23.61 3.37e-15 ***
## Residuals 7258 137.49 0.0189
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
We can see that since the P value is less than 0.05, we can conclude that there are significant differences of the contact rate between different call buckets as highlighted with "*" in the model summary.
Further Analysis below shows which two call bucket groups have a significant difference in contact rate (when p value less than 0.05).
TukeyHSD(result)
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = ContactRate ~ CallBucket, data = ContactRate)
##
## $CallBucket
## diff lwr upr p adj
## 12 Calls-10 Calls -0.039493272 -0.06021023 -0.01877631 0.0000059
## 13 Calls-10 Calls -0.035660977 -0.05620294 -0.01511902 0.0000490
## 15 Calls-10 Calls -0.056560876 -0.07654859 -0.03657316 0.0000000
## 13 Calls-12 Calls 0.003832295 -0.00766998 0.01533457 0.8273783
## 15 Calls-12 Calls -0.017067604 -0.02754801 -0.00658720 0.0001694
## 15 Calls-13 Calls -0.020899899 -0.03102998 -0.01076982 0.0000007
Based on the results of the analysis, customizing call plans by territory has proven to be a successful strategy for higher quality visits.Further statistical analysis (T-test) indicates that the results are statistically significant.
The recommendation moving forward is to continue optimizing call plans per territory in order to maximize contact rate for the ultimate goal of producing better quality visits and increased penetration rates.