President Obama’s education secretary urged parents Monday to pull their children out of school to demand increased safety, but statistics show children are far safer in the classroom than out of it.

The incoming president of the National Rifle Association, meanwhile, said educators should take a look at the prevalence of Ritalin use among school shooters, though analysts said they didn’t know of any link between gun violence and use of the drug to treat attention deficit hyperactivity disorder.

The suggestions emerged as gun control advocates and Second Amendment supporters searched anew for solutions in the wake of a school shooting spree Friday in Santa Fe, Texas, that left eight students and two faculty dead.

Arne Duncan, who was education secretary from 2009 to 2015, acknowledged that it was perhaps a radical idea for an educator to tell parents to take their children out of school, but he said safety has deteriorated so badly that nontraditional steps are needed to shift the debate.

Mr. Duncan suggested that parents try pulling their children from school for a day or two after Labor Day and then gauge the response from lawmakers ahead of the November elections.

“Do we just keep letting innocent children be killed, or do we want to do something to keep them safe?” he said on Twitter. “If we choose the latter, we must think radically, because everything we have done so far has failed.”

But if safety is the goal, then keeping children in school is likely better than the boycott Mr. Duncan is proposing. The National Center for Education Statistics, looking at numbers from the 2014-2015 school year, found that less than 2 percent of homicides involving school-age children occurred at school.

From 1992 to 2015, the total was less than 3 percent, the center found.

Children spend more than 13 percent of their time at school.

Education and teachers groups distanced themselves from Mr. Duncan’s suggestion, and gun rights advocates mocked him.

Chris Cox, executive director of the National Rifle Association’s legislative lobbying arm, said Mr. Duncan “should focus on serious solutions and not ridiculous statements just to get quoted on the evening news.”

“The point is to make kids safe while they are being educated — not give them an excuse to skip school,” Mr. Cox said. “Sadly, we have too many politicians focused on exploiting tragedies to push a political agenda that would not make schools any safer.”

Erich Pratt, executive director of Gun Owners of America, also said Mr. Duncan’s call is wrong-headed.

“If anything, Arne Duncan should be arguing that kids ought to stay home until we start protecting them in the same way we protect our congressmen and our president — with guns,” he said. “Maybe if we forced Congress to work in the same gun-free environment that our children are educated in, then we would see immediate change.”

Nicole Hockley, a member of the group Sandy Hook Promise who lost her son Dylan in the 2012 Newtown school shooting, acknowledged that safety threats aren’t confined to public schools.

“What are we doing when they’re walking down the street? What are we doing when they’re going to the mall or to the movie theater?” she said on ABC’s “This Week” program. “This isn’t just about school shootings. This is about shootings everywhere.”

She said Mr. Duncan’s proposed boycott is one option.

“I can certainly understand a parent’s fear for sending their child to school every day, given how often these things are happening,” Ms. Hockley said. “If we want to have parents pull their kids out of school until we have better solutions in place, that is an option.”

As gun control groups were demanding school safety, retired Marine Lt. Col. Oliver North, the next president of the NRA, suggested that boys have been “drugged in many cases,” leading to violent outbursts.

In a weekend interview with “Fox News Sunday,” he also blamed a culture of violence that bleeds through to young minds.

“All you need to do is turn on the TV, go to a movie. If you look at what has happened to the young people, many of these young boys have been on Ritalin since they were in kindergarten,” Mr. North said.

But psychologists say there is no clear connection between mass shooters and use of central nervous system stimulants.

“There’s really no evidence whatsoever that links treatment for ADHD with Ritalin and drugs like that with violence, let alone gun violence,” said George DuPaul, a psychologist at Lehigh University in Bethlehem, Pennsylvania.

If anything, Mr. DuPaul said, children being treated tend to be less aggressive.

“Certainly, there is some concern in the scientific and clinical community about the potential overreliance on these drugs, but it’s a real stretch to go from that concern to connecting these kinds of drugs to these kinds of acts,” he told The Associated Press.

Peter Langman, a psychologist who keeps an online catalog of information on recent school shooters, found that the overwhelming majority were not medicated or going through withdrawal at the time of their attacks.

“The belief that psychiatric medications cause school shootings is not supported at either the societal or the individual level,” he wrote.

The gun control group Everytown for Gun Safety also said that if the problem is a culture of violence, then Mr. North is part of it because he has promoted and consulted on “Call of Duty: Black Ops II,” a 2012 first-person shooter video game.

“The American people know who bears the most blame for gun violence: the NRA apologists who are always pointing their fingers at everyone else,” said John Feinblatt, president of the group.