New research shows that San Diego County has been losing a key portion of the community, with substantial numbers of the Generation X population group leaving town — and taking their children with them.

There is no single cause, but evidence suggests rising housing prices played a powerful role, combined with falling numbers of middle-income jobs, said study author Kelly Cunningham, economist with the National University System Institute for Policy Research.

“It’s our middle class that’s getting squeezed,” he said Wednesday.

From 2008 to 2013, a period that frames the Great Recession and its slow-growth economic aftermath, the overall population of San Diego County grew by 3.9 percent to 3.17 million people, according to Cunningham’s analysis of census data compiled by the California Department of Finance.

Commentary

However, the population actually fell by 4.6 percent over the five years in Generation X, the demographic cohort from ages 35 to 49. And Millennials, the cohort from birth to 19 (and the largest group), fell by 1.9 percent, indicating enough Gen X families left town to offset births and immigration of young people.

Gen Xer Lisa Ostrosky plans to leave the area in May, when she’s scheduled to graduate with a master’s degree in social work.

“The rents are insane in San Diego, and I can’t see paying $400,000 for a small apartment turned into a condo,” she said.

The irony for Ostrosky, a former Marine, is that her specialty is military mental health. “We need PTSD counselors,” referring to post-traumatic stress disorder, which affect thousands of local veterans.

But even at $40,000 to $50,000 a year, her anticipated entry-level pay won’t be sufficient for her to build savings and buy a home in San Diego, or even rent without a roommate.

“In South Florida, I saw condos for under $80,000; two bedroom and two bath,” she said. “That’s just more obtainable.”

Her story echoes the view of professional economists, who say the relative unaffordability of housing has broad consequences.

“The biggest economic problem California has is that housing is too expensive,” Christopher Thornberg, founding partner at Beacon Economics in Los Angeles, said early this year. “This is a state that desperately needs to increase its supply of housing relative to its population and population growth.”

After tumbling from a peak $518,000 in 2005 to a low of $280,000 in 2009, the median home price in San Diego County has rebounded sharply, reaching $445,000 in July, according to real estate tracking firm DataQuick.

Cunningham notes that net migration from San Diego County to other states fell during the housing crash and peaked during the boom, indicating affordability has been an important driver of population movements.

Meanwhile, the local economy has generally lost middle-income jobs — particularly for nonprofessional workers — since the Great Recession, which started in late 2007.

For example, construction jobs fell by 60 percent. Erosion in manufacturing started earlier; 20 percent of those higher-paying jobs have disappeared since 2000.

The result is an increasingly hourglass-shaped economy.

There’s been strong growth in low-wage jobs at hotels, restaurants and health care companies. And high-paying work is readily available for computer scientists, biomedical researchers and manufacturing executives.

Yet upward mobility seems to have diminished, because it’s hard to climb from a low-skilled job directly into the upper echelons of the labor market.

“I don’t know that San Diego has a good ladder,” Cunningham said.

So far this year, San Diego’s economy has grown briskly, at last shaking off a long period of weak job creation and wage stagnation since the recession ended in 2009.

“Though the recession hit our region hard, we believe in the long term that San Diego’s strong economic recovery, diverse employment options and fantastic quality of life make our city very attractive to families and mid-career professionals,” said Matt Awbrey, chief spokesman for San Diego Mayor Kevin Faulconer.

If the rebound continues, more of Generation X could move into the area, along with other demographic groups.

“We could see a return of growth from net migration, due to the attraction here of so many jobs created,” said Marney Cox, chief economist at the San Diego Association of Governments.

It’s also likely that some of San Diego’s missing Gen Xers moved to Temecula or northern Mexico, where housing costs are lower.

Indeed, Cunningham’s analysis shows a slight, 0.6 percent growth in Generation X in Riverside County (which had 7 percent overall growth), coupled with a decline of 0.9 percent among Millennials.

On the other hand, Riverside County’s recession was even deeper than San Diego County’s, a factor that probably raised its rates of migration to other states.

Meanwhile, San Diego’s famously hospitable lifestyle seems to have remained attractive for those who didn’t mind living with roommates while studying or starting careers. Generation Y, the 20-34 cohort (with generally lower income), expanded by 5.2 percent from 2008 to 2013.

Meanwhile, Baby Boomers and retirees arrived in relative droves, with both groups rising in population by more than 15 percent.

Taken together, the population figures suggest that San Diego has been changing, and relatively quickly by demographic standards.

Always attractive to the older wealthy, the region has retained its powerful pull on the young, who then increasingly struggle to remain as they reach child-rearing age.