Marijuana use raises the risk of stroke and heart failure — even after accounting for other factors, according to new research.

As Pennsylvania, Delaware and New Jersey have legalized medical marijuana, researchers say it's important to weigh the drug's side effects.

In her research, Dr. Aditi Kalla used data from the Nationwide Inpatient Sample on patients from 18 to 55.

About 1.5 percent of the 20 million records sampled showed cannabis use while the others reported no use of marijuana.

"We found that cannabis users still had higher odds of having heart failure or a stroke," Kalla said.

And that was even after adjusting for traditional cardiac risk factors including high blood pressure, diabetes and other conditions.

It's important to know what side effects can arise from cannabis use, Kalla said, just as any other drug.

"Initial studies found that Tylenol use affected the liver, while ibuprofen use affected kidneys," she said.

Kalla said she wants doctors who may recommend certain patients for a medical marijuana card to have that same kind of understanding.

But more research is needed because scientists don't know how often patients were using marijuana, or even how they were ingesting it.

As more states legalize cannabis, Kalla said, patients could become more comfortable speaking openly about the substance. That, she said, could lead to better data collection and further insights into the drug's effects and side effects.