There are a lot of lessons that I’ve learned from using the Medical Expenditure Panel Survey (MEPS) data from the Agency for Healthcare Research and Quality (AHRQ). Some of these I learned after I made some mistakes and some I learned from other people. Overall, it’s a short but evolving note of the things that I’ve learned about MEPS and its nuances. I plan on updating this in the future as I expect to learn more new things. But for those who are interested in learning what I’ve learned, you can read my notes on my RPubs page, which is here.
Building a book using the bookdown package in R - Part 2: Chapters and References
I create a second tutorial on bookdown that provides a high-level overview on how to add chapters and a reference section. It is located on my RPubs site (link).
I plan on creating more tutorials with the bookdown package, so stay tuned.
Building a book using the bookdown package in R - Part 1
I created a tutorial on building an online book using the R bookdown package. The tutorial is available on my RPubs page, which is located here.
I plan on creating more tutorials with the bookdown package, so stay tuned.
Two-part models in R - Application with cost data
I created a tutorial on how to use two-part models in R for cost data. I used the healthcare expenditures from the Medical Expenditure Panel Survey in 2017 as a motivating example. Normally, I use Stata when I construct two-part models. But I wanted to learn how I could do this in R. Fortunately, R has a package called twopartm that was developed by Duan and colleagues. You can find their document for the twopartm package here.
The tutorial I created is located on my GitHub page and RPubs page.
MEPS Tutorial - Part 3: Applying survey weights using R
In this tutorial, we will review how survey weights from the Medical Expenditure Panel Survey (MEPS) are applied using R.
The tutorial is available on my GitHub site and RPubs.
The R Markdown code I used to generate this tutorial is available on my GitHub site.
MEPS Tutorial - Part 2: Merging Data with R
MEPS Tutorial - Part 1: Loading Data into R
For the last couple of years, I have used Stata whenever I worked with MEPS data. Stata is a great statistical program that allows me to script and analyze data from complex survey designs similar to MEPS. However, R is another powerful statistical program that researchers have been using to evaluate and analyze MEPS data. R is free/open source and has a large community that constantly builds packages to improve its utility. Because of its advantages, I wanted to start writing tutorials on how to use R to analyze MEPS data.
This first tutorial provides instructions on how to load MEPS data into R, which is a critical step for data analysis.
You can find the tutorial on my RPubs page (link); I also posted this on my GitHub page (link).
For those of you who are interested in how I developed this tutorial, the R Markdown code is located on my GitHub page (link).
In the coming months, I’ll continue to write more tutorials using R with MEPS data, so stay tuned.
R Markdown: Adding icons using the "fontawesome" package -- a short tutorial
I discovered an interesting package that allowed me to insert icons into my R Markdown documents. I learned how to use some of the basic commands and wrote a short tutorial on how to do this. I posted the tutorial on my GitHub page. I also posted the R Markdown code on my GitHub site.
I also encourage you to check out the Font Awesome GitHub page to learn more about the different icons that are available.
Stata tutorial: Adding the 95% Confidence Interval to a Two-way Line Plot
I created a tutorial on how to add the 95% CI to a two-way line plot in Stata. I use the “connected” command to generate a line plot in Stata, and then I added the 95% CI to each value. Surprisingly, Stata does not have a native feature to allow users to generate these 95% CI on a two-way line plot.
I used the AHRQ Medical Expenditure Panel Survey (MEPS) database for the motivating example. In this tutorial, we plotted the average total healthcare expenditure from 2008 to 2019.
I build this tutorial on Stata, but I used R Markdown to write the tutorial. The R Markdown code is located in my GitHub site (Stata - Line plot with 95% CI tutorial).
You can find the tutorial on my Github site and RPubs page.
I used Stata SE 17 to build this.
R plotly - Bar Charts
I wrote a tutorial on how to use plotly, an R package that allows users to include interactive charts in R Markdown projects.
Here is an example of the bar chart that was created using plotly in an R Markdown project:
The tutorial is available on RPubs, and the R Markdown code is available on my GitHub page.
I really like using plotly for my R Markdown projects because it has some nice interactive features. Hopefully, this tutorial will open the doors to more creativity with R Markdown projects.