David C. Grabowski is a professor of health-care policy at Harvard Medical School. R. Tamara Konetzka is a professor of health services research at the University of Chicago. Vincent Mor is a professor of health services policy and practice at Brown University.

When the Centers for Medicare and Medicaid Services (CMS) released its early summary of federal data on the novel coronavirus in nursing homes, the agency tried to convince the public that there was some light in the thicket of dark numbers. Yes, CMS acknowledged, the numbers of cases and deaths were grim. But, the agency suggested, an early analysis of the data showed that better nursing homes were less likely to be touched by the pandemic.

This is not true. All three of our research teams independently analyzed what determines whether a nursing home will see a coronavirus outbreak. And all of us found that what matters most is the community where the nursing home is located. No care facility, no matter how excellent, can keep covid-19 away if it’s widespread in the areas where staff members live and work. To protect our most vulnerable citizens, we have to protect everyone.

Because the federal reporting system made it optional for nursing homes to report covid-19 cases and deaths related to the coronavirus before May 8, we might never get a clear picture of how the pandemic ravaged these facilities in its early months. One initial estimate suggested that the federal reporting system might have undercounted the number of nursing home residents and staff members killed by the pandemic by as many as 14,000, or 35 percent. But what we know is bad enough.

As of June 7, there were more than 107,000 covid-19 cases documented among nursing home residents, nearly 30,000 of whom died. More than 66,000 staff members were diagnosed with covid-19; roughly 500 died.

Given these numbers, it would be comforting to know that some nursing homes have cracked the code and figured out how to keep their residents safe. But according to our research, location and facility size matter much more than prior quality in predicting whether a nursing home will have a serious covid-19 outbreak. The most important factors influencing whether and how large an outbreak occurs in a nursing home are the population density of the county in which the facility is located, the prevalence of the virus reported in the county and the racial distribution of the nursing home, which are all correlated.

Location matters because the coronavirus that causes covid-19 often spreads without causing symptoms. Visitors have not been allowed in most facilities since March, but staff members still go to work. If a covid-19 outbreak is underway in the community where staff members live, the pandemic will soon be in the nursing home where they work.

Many nursing homes can improve their infection-control procedures. But the expectation that good nursing homes can stop transmission while poorly rated nursing homes cannot is unwarranted. Many top-rated nursing homes have been overwhelmed, while a lot of poorly rated ones are free of covid-19 largely because their staff members live in areas with low rates of infection.

It is also not true, as some Republican lawmakers suggested at a recent House briefing, that policies such as New York Gov. Andrew M. Cuomo’s since-rescinded mandate that nursing homes accept recovering covid-19 patients are largely to blame for coronavirus deaths in these facilities. Several states, including Massachusetts, never required nursing homes to admit covid-19 patients upon their release from the hospital and still experienced significant outbreaks in these facilities.

To save the lives of nursing home residents and staff, we need to target government resources appropriately. If the problem is low-quality nursing homes, increased regulation and oversight around infection control might slow the pandemic. But if, as our research suggests, covid-19 is making it into nursing homes through community spread, then to protect our elders, we need a systemwide government response focused on identifying outbreaks outside nursing home walls and protecting staff members from bringing the virus into the facility.

There are things CMS should do specifically in nursing homes to slow the spread there, among them disseminating personal protective equipment and testing materials. The federal government should also support the nursing home workforce through hazard pay, paid sick leave and adequate wages so staff members can make a reasonable living working a single job at a single facility, making them less likely to spread covid-19 from one nursing home to another.

Eventually, as we learn more about how to control this virus, it will become clear that some nursing homes are becoming better than others at fighting the pandemic. When it does, we should learn from those facilities. But the evidence does not yet suggest that anyone has developed a foolproof formula for stopping covid-19, or that even the best nursing homes had the tools to do so in the first place.

Misdirecting resources because CMS moved too quickly to draw a comforting, but false, conclusion about how to fight the pandemic would be a waste and a tragedy. The only way to protect nursing home residents is to protect everyone who works in them and visits them.

Read more: