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.
ISPOR New Professionals Fireside Chat -- Networking At Conferences
My colleagues, Drs. Sankeet Shah and Koen Degeling, hosted a conversation with Dr. Julia Slejko from the University of Maryland and Dr. Aryana Sepassi from the University of California, Irvine about their experiences and strategies for networking at ISPOR conferences. Dr. Slejko is an Associate Professor of Practice, Science, and Health Outcomes and has a wealth of experiences attending ISPOR conferences. Dr. Aryana Sepassi is an Assistant Professor of Outcomes Research and has just attend her first ISPOR conference in May 2022. Both guest share their unique perspectives on networking at these large conferences and provide suggestions on how to maximize your experience.
You can listen to their conversation on Soundcloud.
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.
ISPOR New Professionals Fireside Chat -- Finding Sponsorship and Mentorship in the Workplace
This month, I had the privledge of participating in the first ISPOR New Professionals Fireside Chat on “Finding Sponsorship & Mentorship in the Workplace" with my colleague Dr. Ka Keat Lim from the King’s College London. We discussed the differences between mentors and sponsors, and our relevant experiences being both the mentors/sponsors and mentee/sponsorees.
We referenced Janice Omadeke’s paper, “What’s the Difference Between a Mentor and Sponsor?” article in the Harvard Business Review to get the conversation started.
In preparation for our podcast, I learned about the differences between the roles of the mentor and sponsor and the challenges for identifying someone in your workplace who can serve either of these roles. More importantly, I also learned about my role as a mentee and sponsoree.
I hope this podcast is helpful and opens the door for your future career development.
The ISPOR New Professionals Network is composed of 750+ recent graduates from health economics and outcomes research (HEOR) related programs. Membership in the Network is available to former ISPOR student members and any new members who join that possess 3 years or less of HEOR experience. To learn more about the ISPOR New Professionals Network, please visit our website.
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.
Hosting an R Markdown HTML file on a GitHub page
INTRODUCTION
R Markdown is a great package for RStudio. You can create (or knit) an html file using R Markdown which will let you add text, snippets of code, and plots. Additionally, you can run R code in R Markdown and have the output as part of the html document.
Here is an example of an R Markdown html file that is currently hosted on RPubs.
You can also create an html file using R Markdown and host it on a GitHub page. This is a feature of GitHub to allow you to host html files from your GitHub account.
There is a lot of flexibility with GitHub; consequently, I’ve started to explore using this option to post tutorials I’ve generated in R Markdown on GitHub. In this article, I’ll review how I was able to host my R Markdown html files on my GitHub repository using the GitHub desktop application.
Step 1: Download the GitHub desktop application
You can download the GitHub desktop application from their website.
Step 2: Create a repository in GitHub
Next, you’ll need to create a repository in GitHub.
Open a browser and go to your GitHub page. Create a new repository. For this tutorial, I’ll create the “R Markdown GitHub Page” repository. This is where I will save my R Markdown html file.
Step 3: Open GitHub Desktop Application
Once you’ve downloaded the app, open it. You should see the “Let’s get started” message. We’ll clone the repository that was created in GitHub (“R Markdown GitHub Page”. Search for this repository and then click on “Clone”
Next, you’ll see a window pop up prompting you to select the location on your computer to clone your repository. Chose a location on your computer where you can easily remember and access.
Once you’ve done that, the GitHub application will open to your repository. You can view the files in the folder where you’ve cloned your repository. Click on “Show in Explorer” and a window will appear with a couple of files. Note: When you create your repository, you can elect to have a README file generated. If you did so, then you will see the “README.md” file in this folder. You can ignore the “.git” folder since this is a hidden folder.
Next, create a folder called “docs” in this cloned repository folder. This is where we will save our R Markdown and html files.
Step 4: Setup the GitHub pages features
Now, return to your GitHub repository that is open in your browser. You will need to setup the GitHub pages features. In the GitHub repository, click on the “Settings” tab. Then click on “Pages” in the “Code and automation” tab. This will allow you to set the GitHub Pages to the main branch and the “docs” folder.
Make sure to click “Save” after selecting the “main” branch and the “docs” folder.
GitHub will generate a url where you can host your R Markdown html file. This may take a few minutes to go live, so click on refresh every few minutes. Once the url has been generated, you will see it on this page.
Step 5: Create R Markdown html
Once you’ve setup your GitHub Pages and activated your url, start RStudio and create a new R Markdown file.
This will generate an R Markdown default template that we will use for our html example.
Next you want to click on “Knit” and select “Knit to HTML.” You will be asked to save the HTML file. Navigate to your “docs” folder and save the HTML file as “index.” This will save your HTML file as “index.html” in the “docs” folder. Next, save your R Markdown file as “index.Rmd” in the “docs” folder. You should have two files in the “docs” folder: “index.html” and “index.Rmd”
Step 6: Push the changes to the main branch
After saving your R Markdown file and html file in the “docs” folder, you will need to push these changes to the main branch. Return to your GitHub application and review the changes that are being made. We have two changes that reflect the addition of two files into the “docs” folder.
Every time you make a change to the main branch, you have to enter a short note. I entered “Build R Markdown HTML page” for the title of my short note, and then I include a short description of that change.
Next, I click on “Commit to main” to make the changes to the GitHub application. You will receive a message to push these changes to the main branch. Make sure to select “Push origin” to finalize the changes to the main branch.
Step 7: View your R Markdown html file on your GitHub url link
After you push your final changes to the main branch, the R Markdown html file will be hosted on the GitHub url link that you generated.
CONCLUSIONS
R Markdown is a great way to generate html pages on your R code and output. You can share these files using GitHub Pages in addition to the GitHub application. Additionally, you can work with other folks to make edits and leverage the GitHub applications to push these changes easily to the main branch
This is a work in progress, and I anticipate updating this article as I discover new and innovative ways to improve upon this tutorial.
REFERENCES
I used several references to learn how to post R Markdown html files on GitHub Pages. Here are a few of them:
Sample size estimation using the odds ratio in a case-control study
ISPOR 2022 North American conference (May 15-18, 2022) -- My experience
I traveled to Washington, DC for the North American ISPOR 2022 conference (May 15-18, 2022).
I volunteered to report on several sessions with my colleague Enrique Saldarriga; we wrote articles that were published on the ISPOR Values & Outcomes Spotlight special conference issue. Some of the sessions were provided virtually on-demand as early as 13 May 2022.
On Friday, 13 May 2022, we reported on, “Applications of Discrete Choice Experiments for Patient Preference Elicitation,” which was moderated by Dr. Ellen Janssen with panelists Drs. Rosanne Janssens, Susan dosReis, and Hannah Collacott.
On Monday, 16, May 2022, we reported on the following sessions:
Dealing with Disability in Health Technology Assessment (HTA)
How Much Weight Should be Placed on Additional Value Elements in Health Technology Assessment?
On Tuesday, 17 May 2022, we reported on the following session:
Can Pharmaceutical Pricing Move Beyond Cost/QALY for Value Consideration?
On Wednesday 18 May 2022, we reported on the following session:
Health Technology Assessment for Gene Therapies: Are Our Methods Fit for Purpose?
We also provided a report on select posters in the Mental Health category
Finally, I was part of the New Professionals Steering Committee Panel on Tuesday, 17 May 2022, where the steering committee discussed the topic, “Things They Didn't Teach in Grad School: Survival Skills for New Professionals.“
This was first time ISPOR had a in-person meeting since the COVID-19 pandemic began. Unlike previous in-person meetings, this year’s conference had both virtual and in-person options, which I appreciated. It allowed for speakers who were unable to attend in-person provide compelling presentations and sessions, and it allowed for attendees to tune in from around the world. I’m looking forward to the next meeting in 2023.