First, we looked to see if there was an overall trend in the average price of all drugs from 2013 to 2017. We observe a clear increasing trend in the overall average drug price. In particular, we observe a notable increase between 2014 and 2015. We think this may be related to the full implementation of the Affordable Care Act (ACA) in 2015.
final_dataset %>%
group_by(year) %>%
summarize(avg_all_drugs_price = mean(avg_price)) %>%
plot_ly(x = ~ year, y = ~avg_all_drugs_price, mode = "lines", type = "scatter") %>%
layout(title = "Trend in Overall Average Drug Price", yaxis = list(title = "drug price (USD)"))
#
# ### Yearly distribution of drug prices
# We look at the yearly distribution of drug prices for a few drugs. Some drugs have skewed price distributions. Zoloft, a drug that treats panic disorders, seems to have almost doubled in price from 2013 to 2017.
# # trade_name_choice = "Zoloft"
# violin_drug = drug_price %>%
# filter(trade_name == trade_name_choice) %>%
# ggplot(aes(x = year, y = unit_price, fill = year)) +
# geom_violin() +
# ggtitle(paste0("Distribution of Prices (USD) for ", trade_name_choice), subtitle = NULL)
#
# ggplotly(violin_drug)
We created a spaghetti plot of the average price per year for each drug. Information about the disease that the drugs treat can be seen by hovering over the plot. We notice that, the drugs for Hepatitis C seem to have the highest cost.
final_dataset %>%
#filter(disease %in% c("Obesity")) %>%
filter(pricing_unit == "EA" & !is.na(disease)) %>%
plot_ly(x = ~year, y = ~avg_price, type = "scatter", mode = "lines", text = ~paste("Drug: ", trade_name, '<br>Disease:', disease), color = ~trade_name, alpha = 0.5) %>%
layout(title = "Average Price (USD) of Drugs over Time", showlegend = FALSE)
We compared pricing of the drugs classified in each category.
The Most Abused Drugs sample dataset has the lowest mean of average price per tablet of $5.22.
The Most Advertised and the Most Popular Drugs datasets have similar means of average price per tablet of $25.78 and $22.86, respectively.
The Most Prescribed Drugs dataset has the highest mean of average price per tablet of $259.26.
These results are particularly interesting.
The most abused drugs are relatively inexpensive compared to others. This gives patients greater access to highly addictive prescriptions, including painkillers. This may be a driving force of prescription drug abuse; cheap and highly addictive are fatal combinations for drug dependence.
The most prescribed drugs are notably more expensive. The mean is skewed by the Hepatitis C drug, Harvoni. Harvoni has a median average price of $1,093.83.
Limitation