Introduction and Motivating Example
Every once in a while, I hold an impromptu discussion about a paper with my students. During the 2025 Summer, I found an interesting paper by Jureka and colleagues titled, “Implementation of a statewide fentanyl possession law and opioid-related overdose deaths,” which was published in JAMA Health Forum.[1]
In their paper, Jureka and colleagues studied the impact of a 2022 Colorado State fentanyl possession law (HB 22-1326) where having a small amount (1 gram to 4 grams) of fentanyl would be considered a felony and punishable with prison time (up to 180 days).
The authors’ objective was to predict what would happen to the opioid-related overdose death rates after the passing of the updated fentanyl possession law and to compare this with the observed opioid-related overdose death rates. The authors used an auto-regressive integrated moving average (ARIMA) model to predict the opioid-related overdose death rates between August 2022 to November 2023, which was then compared to the observed opioid-related overdose death rates.
This paper was interesting because it uses a serial cross-sectional design, which is a series of cross-sectional data across time that are stitched together to form a longitudinal trend of data. The authors focused on Colorado’s opioid-related overdose death rates, which used monthly data that were stitched together from the Colorado Department of Public Health and Environment.
Because of these features, I wanted to share with my students how the authors could have potentially performed their study.
So, I ended up downloaded data from the CDC WONDER database and performing a revised analysis (inspired by this paper) to answer a different question: Did the new fentanyl possession law impact the opioid-related overdose death rates between 2018 to 2023?
To answer this question, I have planed to write two articles: Part 1 will focus on how to acquire the data, and Part 2 will focus on how to perform an interrupted time series analysis.
Objectives
Part 1: Acquire opioid-related overdose death data from the CDC WONDER database (current article)
Part 2: Perform interrupted time series analysis (Forthcoming)
Data Source
In the paper, the authors used data from the Colorado Department of
Public Health and Environment. Individuals who were less than 18 years
old were excluded. Deaths that were due to the following ICD-10 codes
were included as a death due to an opioid-related overdose:
T40.0 (opium), T40.1 (heroin),
T40.2 (natural opioid analgesics), T40.3
(methadone), T40.4 (synthetic opioid analgesics other than
methadone), and T40.6 (other and unspecified
narcotics).
I didn’t have access to the Colorado Department of Public Health and Environment, but I had access to the United States (US) Centers for Disease Control and Prevention (CDC) WONDER data.
The CDC WONDER is publicly available, and should be close enough to reflect what was reported at the Colorado Department of Public Health and Environment.
Here are the steps to acquire the data from the CDC WONDER.
Step 1: Access the CDC WONDER Data
Navigate to the CDC WONDER website (https://wonder.cdc.gov/).
Select the "Multiple Causes of Death" option.
CDC WONDER Front Page
Step 2: Request Data
Request the data using the
"Current Final Multiple Cause of Death Data." Data are
available between 2018 and 2023 (at the time of this article, the date
was 30 November 2025. The data range may change in the future).
Select "Data Request" option.
Data Request Page
Once you select this, you will be directed to the Data Use Agreement
(DUA) page. Please read this carefully. Once you’ve read the DUA and
agree to its terms, click on "Select" to proceed to the
data query page.
DUA Page
Step 3 - Data Query
There are 8 sections in the data query window.
Section 1: Organize Table Layout
Section 1 allows you to arrange how you want the data to be laid out on a spread sheet.
For this particular study, I wanted to get the number of
opioid-related overdose deaths into monthly intervals. So I selected the
"Group Results By" option into Year and
Month. For the "Measures", we will leave these
at their default settings.
Section 1: Organize Table Layout into Year and Month
Section 2 - Selection Location
In Section 2, we can select the location of interest. There are a few options, and they include States, Census Regions, HHS Regions, US-Mexico Boarder Regions, and US-Mexico Border State Areas.
For this study, we will select "Colorado" to be aligned
with the study by Jureka and colleagues.
Section 2: Select Location
Section 3 - Select Demographics
We want to select individuals who were >= 18 years old.
We need to select the "Single-Year Ages" category and
then select the single-year ages from the box of available ages.
The rest of the options can be left at their default settings.
Section 3: Select Demographics
Section 4 - Select Year and Month
In Section 4, we can select the year and month of interest.
For this study, we will emulate the time horizon that Jureka and colleagues used: 2018 to 2023.
Section 4: Select Year and Month
Section 5 - Select Weekday, Autopsy, and Place of Death
We will leave Section 5 at its default setting.
Section 6: Select Weekday, Autopsy, and Place of Death
Section 6 - Select Underlying Cause of Death
We will leave section 6 at its default setting for the underlying cause of death.
Section 6: Select Underlying Cause of Death
Section 7 - Select Multiple Cause of Death
In Section 7, we will select the codes that are related to the deaths associated with opioid-related overdoses. These ICD-10 codes were provdied by Jureka and colleagues in their paper.
There are:
T40.0 (opium) T40.1 (heroin)
T40.2 (natural opioid analgesics)
T40.3 (methadone) T40.4 (synthetic
opioid analgesics other than methadone) T40.6 (other
and unspecified narcotics)
Section 7: Select Multiple Cause of Death
Section 8 - Other Options and Finalize Query
In Section 8, we will leave all the options at their default setting.
Once we are done with the query settings, we can select
"Send" to begin the query.
Section 8: Other Options and complete Query
This will begin the query. There is a status bar for the query processing time.
Status bar
Export Data
Once the query is completed, you will be shown the data in
HTML format. You can export the data by clicking on the
"Export" button and save this as a *.CSV
file.
Export data as *.CSV file
Step 4 - Population data
After exporting the data, you should have the monthly number of opioid-related overdose deaths from 2018 to 2023.
However, we want to estimate the rate (number of deaths / 100,000 population).
Unfortunately, the CDC WONDER does not populate this information in the data query. Therefore, we will need find the population estimates for Colorado by year.
There are several places where you can find this information. I used the Annual Population Data for Colorado which I got from the Federal Reserve Bank of St. Louis (FRED).
Once I had these data, I merged both datasets into a single
*.CSV file, which I uploaded to my GitHub
site.
Next steps
Now that we have created our dataset, we will perform an interrupted time series analysis to evaluate whether Colorado’s updated fentanyl possession law impacted the monthly opioid-related overdose events from 2018 to 2023 in a follow-up article.
References
- Jurecka C, Adams J, Padmanabhan P, Glanz J, Christine P, Guan X, Kline D, Binswanger I, Barocas J. Implementation of a Statewide Fentanyl Possession Law and Opioid-Related Overdose Deaths. JAMA Health Forum. 2025 Aug 1;6(8):e252654. doi: 10.1001/jamahealthforum.2025.2654. PMID: 40748547; PMCID: PMC12317351.
Disclosures and Disclaimers
This is a work in progress; thus, I may update this in the future.
Any errors or mistakes are my fault, and I’ll try my best to fix them.
Lastly, this is for educational purposes only.