The students, teachers, and administrators of Marjory Stoneman Douglas High School in Parkland, Florida, have practiced how to respond to a school shooting.

Stay calm, stay in place. Those are the messages they had rehearsed during a routine active-shooter drill just days after returning from winter break.

But still, 17 people died and 15 others were injured.

Students all over the US have conducted similar drills. Contending with an active shooter is as much a part of school life as roll call and exams. I practiced how I would protect my students from a gunman when I was a professor at the University of Texas at Dallas. In 2016, Texas Gov. Greg Abbott signed a bill allowing guns on campus and my students were anxious.

What if a fellow student threatened them with a gun in the busy parking lot where they vied for too few spaces every morning? What about the roommate who became depressed and withdrawn during finals week — what if he could bring a gun onto campus?

We talked about the new campus carry law at the beginning of each class until I worried we would fall behind and steered the conversation back to the day's lecture. But I was anxious, too. I watched a video that said it would prepare me to deal with an active shooter in my classroom. It suggested I throw whatever was in my hands at the gunman. On most days, that was a half-empty bottle of water and a whiteboard marker.

Nearly a dozen states allow guns on university campuses and at least a dozen more are considering passing legislation to allow campus carry. Mass shootings are becoming deadlier and research on gun violence is limited.

Before I was a journalist who covered mass shootings (and a university professor who feared them), I was a public health doctor at the Centers for Disease Control and Prevention. Many believe the CDC is banned from studying guns — but that's not exactly true.

The CDC studied gun violence from the mid-80s to the mid-90s until a 1993 study it funded angered the National Rifle Association so much that it lobbied Congress to shut down the CDC division that researched gun violence. The study showed that keeping a gun in the home was associated with a higher risk of being killed by a relative or close acquaintance.

Three years later, Rep. Jay Dickey, a lifetime member of the NRA and a Republican from Arkansas, added an amendment to the bill that funds the CDC that said "none of the funds made available for injury prevention and control" could be used to study or promote gun control. That same year, Congress stripped the CDC of $2.6 million — exactly the amount the agency had spent studying gun violence the previous year.

The message was clear: Study gun violence and risk your career and your agency's funding. CDC researchers who used to study gun violence told me they stayed well clear of guns for fear of jeopardizing their livelihoods.

I was stationed in Arizona for the two years I worked at the CDC. In Phoenix, Friday night was ladies' night at the gun range. I would gather my friends and we would empty Berettas and Glocks into zombie-shaped targets before carefully wiping our hands and faces (ammunition contains lead, which is a health hazard) and heading to the local taco joint.

I took up shooting when I was a medical student in England and discovered the cool, dark refuge of the gun range. We lay on our bellies with .22 rifles pressed to our shoulders; nothing else could take my mind off anatomy exams in the same way. But that doesn't mean I want guns in my classroom. I can love guns and still want a ban on assault rifles and magazines that fire more than 10 rounds. I can love guns and still want the CDC to study what triggers mass shootings, how we can end gun violence and how we can keep children safe in school.

My former colleagues at the CDC felt helpless when it came to gun violence. I felt the same way in my classroom at the University of Texas at Dallas, weighing a bottle of water in one hand and a whiteboard marker in the other, wondering which would be the better missile against a gunman.

Dr. Seema Yasmin is a medical doctor and journalist. She teaches science communication at Stanford University, where she is a John S. Knight Fellow in Journalism.