History

I'm a novice when it comes to programming. Most of my work has been in Stata and R. However, I've been learning how to code using SQL as part of my job. I took a class on Python and found it helpful when it comes to learning first-order logic. I find these skills incredibly useful and rewarding, especially when it comes to generating publishable-worthy graphics and being able to think logically. A major project that I will undertake is to redo many of my decision analytic models using R and to develop queries that will result in analyzable datasets.


Programming Links

I've compiled a list of helpful links related to programming and my own GitHub page which is undergoing construction. I hope to have more codes and projects in my GitHub repository soon.

My GitHub page: https://github.com/mbounthavong

Stata programming and codes: https://github.com/mbounthavong/STATA-programming-and-codes


Counting events and preparing data set for interrupted time series analysis

I have always had a difficult time preparing my data set for an interrupted time series (ITS) analysis. This requires further manipulation of the data (in the long format) to count backwards in time before the index date (time of the first event) and counting forward in time after the index date.

I finally took time to write the Stata code for version 15 and posted it on my Github page. Please feel free to let me know if there are any errors or suggestions for improvements.

I created an accompanying tutorial here.


Performing Bayesian analysis with the bayesAB package in R

I learned to use the bayesAB package in R through a tutorial by BC Mullins, which can be found here. I was inspired to replicate the work and create a R Markdown file for it, which I saved as an html page on my Rpubs.com website. This package allows you to explore the different posterior distributions even after increasing the trial (or sample) size of the experiments. In doing so, you update the Bayesian priors and improve the precision and accuracy of the posterior distribution. The advantage of using Bayesian analysis over the conventional Frequentist approach is the ability to provide a stakeholder with the probability that drug A will be better than drug B. Conventional Frequentist inference only can tell you whether drug A is statistically significantly different from drug B. Bayesian interpretation provides us with the ability to predict how often drug A will be better than drug B. 

The GitHub code can be found here.


R Shiny - Tutorial: Histogram

I developed my first R Shiny app and posted it on www.shinyapps.io. R Shiny is a data viz interface for R Studio used to develop interactive graphics. I started to use www.shinyapps.io to host my R Shiny apps. You need to to install the rsconnect package into R. A tutorial on how to install rsconnect and how to publish R Shiny apps on www.shinyapp.io can be found here.

The app is a simple histogram with a widget that goes from 1 to 100. 

You can view the Shiny app here.

The code for this app can be viewed on my GitHub page here.


JAGS Tutorial in R

I recently wrote a JAGS tutorial in R using data from my professor, Dr. Beth Devine, that was used for her lecture. The Tutorial goes over how to perform simple pair-wise meta-analysis using a Bayesian framework. JAGS stands for "Just Another Gibbs Sampler" and provides a reliable and fast means for performing multiple parallel chains of operations for a single likelihood function. Martyn Plummer is credited with creating JAGS, and you can find his SourceForge account here.

You can view my tutorial here.

The Markdown codes for my tutorial are located here.

You will need to have R Studio installed along with the rjags, coda, and boa, packages.


Medication Possession Ratio and Proportion OF Days Covered calculator

I created a Stata template to calculate MPR and PDC for one drug. The calculator is a *.do file that takes the prescription history of a patient for a single drug and estimates the adherence. You can view the Stata code here.


Hoyle and Henley's methods for improving curve fits to summary survival data

While I was working on a project, I had to simulate survival data based on a Weibull distribution. I found a useful article by Martin W. Hoyle and William Henley that details their methods for fitting curves to survival data, "Improved curve fits to summary survival data: application to economic evaluation of health technologies." The authors provided an Excel file with the necessary formulas to generate the Weibull distribution parameters (lambda and gamma) and offer suggestions for using these methods in a probabilistic sensitivity analysis. Although not necessarily a program, these methods can be used in R in order to generate the codes for survival curve simulations in decision analytic models.