A growing body of research has found that legal medical marijuana is associated with decreased alcohol and opioid use, alongside other public health and safety benefits. But according to a new research study, certain demographics may benefit more from medical marijuana than others.

This new study, published in the Forum for Health Economics & Policy journal, found that people living in states with legally-protected access to medical marijuana dispensaries experienced “improved self-reported health among several demographic groups, such as individuals with only a high school degree and non-whites, and especially among people with chronic pain,” Marijuana Moment reports.

In the study, researchers from the University of Pennsylvania explored data from the Behavioral Risk Factor Surveillance System — a national survey given to around 300,000 people a year — collected between 1993 and 2016. In this survey, respondents were asked to rate their health over time, keeping track of how many days they were in poor mental or physical health, and days in which they suffered health-related functional limitations.

Gallery — Rihanna and Weed Go Together Like Milk and Honey:

Researchers looked at self-reported health data from states that had passed medical marijuana laws (MMLs) before 2016 to states that had not. The study reports that “a MML alone increased the probability of reporting very good or better health by 1.7 percentage points and reduced the number of days with mental health problems by 0.114 days (or 3 percent), while dispensaries show little effect.”

Broken down by demographics, researchers found that certain groups experienced greater benefits from access to medical cannabis than others. The study reports “strong improvements in health among non-white individuals, those reporting chronic pain, and those with a high school degree, driven predominately by whether or not the state had active and legally protected dispensaries.”

“In several instances, the implementation of a MML alone led to improvements in health as well,” the authors wrote, according to Marijuana Moment. “For example, a medical marijuana law reduced the number of days with mental health issues and health related limitations among the married, while those with more than a high school degree, men, and those older than 54 saw reductions in days with mental health problems.”

The findings also confirmed previous research suggesting that legal medical marijuana is linked to decreased alcohol use. The study authors wrote that MMLs are “negatively related to alcohol consumption, reducing the probability of being a heavy drinker by 0.03 percentage points and the probability of being a risky drinker by 0.8 percentage points.”

In conclusion, the authors noted that state laws that actively protect access to medical cannabis dispensaries were associated with greater health increases than states that did not. “One insight of our study is that the effect of medical marijuana legislation depends on whether the state legally protected active marijuana dispensaries,” the authors wrote. “Distinguishing between both types of laws suggests that many of the observed health gains from a MML manifest through legally protected and active dispensaries.”