Methods

Performing inflation adjustment with price indices in economic analysis

Introduction

Generally, when I use cost data from the past, I tend to perform some kind of inflation adjustment. That’s because the value of $1 is not the same today as it was a year ago. Therefore, we need an approach to adjust the value of past costs into today’s terms. We think of past costs as nominal (or unadjusted) costs. To express these costs into today’s value, we need to perform an inflation adjustment.

Recently, I was working with my students, and they had pulled cost data from the Agency for Healthcare Research and Quality (AHRQ) Medical Expenditure Panel Survey (MEPS). MEPS provides healthcare expenditure data on a number of categories (e.g., total, outpatient, inpatient, and pharmacy). Once can download and use the MEPS data to study the trends in healthcare costs over time. However, the past healthcare costs are not adjusted for time and will require some application of a price index.

Depending on your needs, MEPS provides recommendations on what kind of price index to use. The most common price index is the Consumer Price Index (CPI). The United States (US) Bureau of Labor and Statistics (BLS) provides data on the CPI, which can be accessed on their website (link).  According to the BLS site, “The Consumer Price Index (CPI) is a measure of the average change over time in the prices paid by urban consumers for a market basket of consumer goods and services.”

The BLS also has a CPI calculator where you can enter the dollar amount at a specific month and year to estimate its inflation adjusted amount.

However, if you want to use the actual CPI data, you can download these from the BLS website (link).

 

Consumer Price Index Example

Here is a short tutorial on how to download the CPI data and perform an inflation adjustment.

Step 1. Download the CPI data from the BLS website.

Navigate to the BLS website (link). Click on “Tables.” This will bring you to the BLS CPI database page.

You see links to archived CPI releases. There is a lot of data on this site. To make things easier, we’ll focus on the annual CPI numbers.

Step 2. Select the Historical CPI-U, which contains all the annual CPI from its inception in the United States. This will be helpful in converting any dollar year into the inflation-adjusted dollar.

Note: We use the CPI-U because it includes all urban consumers, which represents over 90% of the total US population. There are other types of CPI calculations that you can use based on your needs. I encourage you to explore these.

Once you have downloaded the Historical CPI-U file. Open it and review the columns. The column that we are interested in is the “Annual” column, which contains the annual CPI for that year.  

Step 3: Let’s suppose that we were interested in performing an inflation adjustment for $100 in 2028 to 2025 value. We take the CPI for 2025, which is 321.943 and divide this by the CPI from 2008, which is 215.303.

Step 4: Once we have the inflation adjustment ratio, we can multiply this by $100 from 2008 to get the 2025 inflation-adjusted value.

Therefore, $100 in 2008 is worth $149.53 in 2025.

Personal Consumption Expenditures Example

But what if you wanted to use the Personal Consumption Expenditures (PCE) Price Index instead of CPI? MEPS recommends we use the PCE Price Index when we pool data from multiple years or evaluate trends across multiple years.

The PCE Price Index is available from the US Department of Commerce Bureau of Economic Analysis (BEA)website (link).

According to the Bureau of Economic Analysis, the PCE Price Index measures the “prices that people living in the United States, or those buying on their behalf, pay for goods and services.”

To get the PCE Price Index, you will need to do the following:

Step 1: Go to the BEA’s PCE Price Index website (link). Select Tools > Interactive Data. From there Select “Gross Domestic Product / Personal Income.” This will take you to another page where you can finally select “Interactive Data Tables.”

Step 2: In the interaction data tables page, Select “Section 2 – Personal Income and Outlays.” This will expand the field. Scroll down and Select “Table 2.5.4. Price Indexes for Personal Consumption Expenditures by Function (A).” The (A) indicates “Annual.” This opens the Interaction table where you can Modify the date range. By default, it will give you the most recent year and the last several years.

Step 3: Use the “Modify” option to change the time range.

Change the “First Year” to “2008 A,” This will expand the PCE Price Index time year from 2008 to 2024.

Notice that we don’t have 2025 on this Interactive table. The 2025 annual PCE Price Index is available, but you will have to do a little more digging.

Step 4: Go back to the National Income and Products Account and Select Table 2.8.4. Price Indexes for Personal Consumption Expenditures by Major Type of Product, Monthly (M).

Copy the PCE Price Index for the months of January all the way to December for 2025.

Paste this into Excel and average the PCE Price Index for all twelve months. This will give you the PCE Price Index for 2025.

Step 5: Now that we have the PCE Price Index for 2025, we can return to our previous example and perform an inflation adjustment of $100 from 2008 to its inflation-adjustment 2025 value.
We take the PCE Price Index for 2025, which is 126.919 and divide this by the PCE Price Index from 2008, which is 89.197.

Step 6: Once we have the inflation adjustment ratio, we can multiply this by $100 from 2008 to get the 2025 inflation-adjusted value.

Therefore, $100 in 2008 is worth $142.29 in 2025.

 

Conclusions

Adjusting past costs to current value is an important part of performing economic analyses, particularly when we are looking at the trends. If we don’t make this adjustment, our analysis will be incorrect and will generate the wrong conclusions. In this article, I reviewed two types of price indices, but there are others. MEPS provides a nice guideline on which ones to use on their website (link), and I encourage you to explore these.

 

Disclosures

This is a work in progress and subject to future changes.

This is for educational purposes only.

 

One-sample z-test of proportions in R

There are situations where you will be asked to compare the performance of your institution with another institution. This is commonly done with projects that I’m on where data collection occurs at a single site, and stakeholders want to compare the single site’s findings with a reference site. More commonly, stakeholders want to compare their performance to a published paper’s findings. In other words, we want to compare an observed finding to a theoretical one.

In the case of proportions, we can compare the proportion of individuals who experienced an event in single site to the proportion from a published study. To do that, we can use the one-sample z-test of proportions.

I wrote a guide on how to perform one-sample z-test of proportions to determine if the proportion of events observed is significantly different from an expected proportion, which is available on my RPubs site (link).

Literary Cafe series: Policy analysis (Part 2) - Interrupted Times Series Analysis with publicly available data

I’m back with some Literary Cafe series updates.

I have regularly informal discussions with my students about interesting papers in the biomedical sciences. Recently, we discussed a great paper by Jurecka and colleagues on the impact of a state-wide law to change the definition of fentanyl possession on opioid-related overdose death rates.

Jurecka and colleagues used publicly available data to perform their research, and I wanted to show my students how this was done using CDC WONDER data. Hence, I started this Literary Care series to document these exercises for others to learn from.

Last month, I wrote an article on how to get data from the CDC WONDER site, which you can read here. I considered this Part 1 (Getting the data).

This is the second part of a two-part series that illustrates how to use publicly available data to replicate the findings from a published study. In Part 2, I use the data from Part 1 to analyze the impact of the statwide fentanyl possession law on opioid-related overdose death rates using an interrupted time series analysis. I posted this on my RPubs site (link) along with part 1 (link).

Ratio of risk ratios in R

I ran into a problem where I had two risk ratios, but I wanted to evaluate the statistical difference between them. I couldn’t find an R package, but I found a paper by Altman and Bland that go over the step-by-step process. I wrote a tutorial on how to perform this method using R, which is available on my RPubs page (link).

Reference:

Altman DG, Bland JM. Interaction revisited: the difference between two estimates. BMJ. 2003 Jan 25;326(7382):219. doi: 10.1136/bmj.326.7382.219. PMID: 12543843; PMCID: PMC1125071.

Medication adherence estimations using R - Part 1

I created a tutorial on how to use the AdhereR package in R to estimate the medication adherence rate for a sample of individuals with prescription claims data. I posted the tutorial on my RPubs page (link).

The two most common medication adherence meaures are the Medication Possession Ratio (MPR) and the Proportion of Days Covered (PDC). This tutorial reviews how to estimate these medication adherence rates using AdhereR in R.

Propensity score matching in R

I wrote an introductory tutorial on how to perform propensity score matching using R, which has been posted on my RPubs site (link).

Propensity score matching is a statistical approach to balancing the observed covariates between groups. In observational studies, this method has the potential to mitigate potential confounding and allow us to make causal interpretations. However, there are a lot of approaches and nuances. This intorductory tutorial presents the basics of propensity score methods and how we can use these in our conventional analyses.

Prepost analysis with continuous data using R - Part 1

I wrote a tutorial on how to perform simple prepost analysis using R, which is available on my RPubs page. It covers how to compare two differences (change in value before and after an interention) using independent t test and linear regression approaches. However, it doesn’t cover how to address correlation between two dependent values. Part 2 of prepost analysis will cover those issues.

Some cool website on study design and biostatistics

This month (November 2024), I wanted to take a break from writing tutorial and articles. Instead, I wanted update myself on (and share) some very helpful/useful online resources.

A colleague of mine introduced me to website called Datamethods. It’s mainly a discussion forum, but it has some useful resources. This particular post contains references that are very useful for anyone who is interested in study design and biostatistics (link). It is a collection of papers and articles that addresses common myths and practices regarding the application of biostatistics in study designs.

Another great website is Scott Cunningham’s Mixed Taped Sessions. He has a book called Mixed Taped Session about causal inference, and he has regular workshops. I attended his Causal Inference Part 2 workshop, and it was amazing. We learned about the basic difference-in-differences methods (coding in R and Stata), and the innovations surrounding these methods (e.g., Callaway & Sant’Anna’s staggered difference-in-differences approach). Scott also provides the historical perspectives on these methods, which are insightful as they are entertaining. Moreover, he conducts interviews with prominant econometricians, which he posts on his YouTube channel.

Hopefully, these sites are useful for you as they have been for me.

Linear spline (piecewise) models in Stata

I wrote a tutorial on how to construct linear spline (also known as piecewise) models using Stata, which has been uploaded to my RPubs site.

Previously, I have developed tutorial on using the linear spline method for interrupted time series analsyis with Stata. However, I did not properly go over the mkspline commands.

In this tutorial, I review the mkspline command and the marginal option to generate coefficients that could be interpreted as the slope within each segment or the change in slope between segments, respectively.

Mediation analysis using R

It’s not uncommon to see covariates in a regression model that should not be there. For example, measurements that occur after the treatment assignment are included into a regression model as baseline covariates. Rather, one should consider a mediation analysis.

I wrote a tutorial on how to perform mediation analysis using R on my RPubs site (link).

I know that I make this mistake at times. This tutorial helped me to carefully consider which covariates to include in a regression model and which ones to consider for mediation analysis.