Photo: Mladen Antonov/AFP/Getty Images

More often than not, political affiliation runs in the family — for a while, at least. Teenagers have a reputation for rebellion, but when it comes to politics, their beliefs are strongly affected by what their parents think: Even before they’re old enough to vote, children of Democrats tend to identify as Democrats, and children of Republicans as Republicans.

It makes sense: After all, many parents have the advantage of being their children’s first source of political messaging. “Kids are these empty cups you can pour beliefs into, and they’re more likely to stick,” says Jeffrey Lyons, a political science professor at Boise State University. “And there’s also just the sheer magnitude of exposure you get to parents.”

But what happens once kids leave the bubble of the family home and venture out into the world? In a study published in this month’s issue of Political Psychology, Lyons found that the strong parental effect may not last: As we age into adulthood, other factors — like local leanings (is your town more liberal or more conservative?) or a spouse’s beliefs — can become more important factors in determining political identity.

Even during our younger years, family face-time doesn’t necessarily guarantee political influence. According to a 2009 study in the Journal of Politics, parents who are more politically engaged and have consistent views on political issues tend to sway their children’s politics more than parents who are less politically engaged, or those who change their opinions on issues. Parental opinion also may influence some political topics more than others — parents’ views are especially influential regarding issues with a clear moral component, like prayer in schools.

The question is which influences win out when parents’ political opinions clash with the surrounding environment. In his study, Lyons analyzed a data set tracking the partisan identities of almost 700 people at age 18 in 1965, age 35 in 1982, and age 50 in 1997. Afterward, he examined how strongly certain variables — like parents’ beliefs, spouse’s beliefs, and the political leanings of the counties where participants lived —influenced the likelihood that someone would be a Democrat or a Republican. His conclusion: The older we get, the more important political environment becomes.

To test the strength of each variable, Lyons used a seven-point scale, running from strongly Democrat to strongly Republican. A participant’s position on that scale at age 18, he found, was closely tied to her parents’ political beliefs. A child with a strongly Republican mother, for example, would be an average of 2.25 points more conservative than a child with a strongly Democratic mother, while fathers’ political beliefs led to a 2.5-point shift. By contrast, the red or blue identity of an 18-year-old’s home county had almost no effect on her own affiliation.

But by age 35, parents’ political beliefs were less predictive of how participants identified, accounting for a shift of roughly a half-point for mothers and one point for fathers. The politics of a county, meanwhile, proved twice as influential as parental beliefs, and the politics of a spouse almost three times as influential. By age 50, a spouse’s political beliefs were by far the strongest influence on a person’s political identity, followed by a county’s politics, and then a father’s politics. A mother’s politics had almost no bearing on the political identity of 50-year-olds. Lyons believes the gap between mothers and fathers has to do with the generation represented in the data, whose members came of age during a time when politics was considered more of a man’s world than it is today.

But the other results would likely hold steady across generations, Lyons says –including the tendency of a spouse’s political influence to not only mitigate that of the parents, but overpower it. It may not happen all at once, but a spouse’s influence can grow with time thanks to greater exposure. (Lyons also notes that people strongly influenced by their spouses’ politics may be more likely to remain married at age 50.)

The other takeaway for Lyons: The power of environment on political identity adds a new layer of nuance to the idea that Americans tend to insulate themselves from people with conflicting views. “Not everybody is able to do this insulating thing,” Lyons says. “For example, you can’t really choose your co-workers that well. So it would be hard to avoid the other political party in a workplace.” Other researchers have shown that other factors like commute time often take precedence over politics when people choose where to live. Rather than arguing that most people seek out neighbors who share their beliefs, then, it may be more accurate to say that people gradually adopt the beliefs of those around them.

Amid all these lifestyle factors that change with age, though, there’s one thing that remains relatively constant: genetics. A 2009 study of identical and nonidentical twins, published in the journal Political Research Quarterly, found that “partisan strength,” or the degree to which someone identifies with a political party, is in large part a trait passed through genes. In fact, according to Chris Dawes, a New York University politics professor studying the heritability of complex social traits, genes and external factors likely interact closely in shaping a person’s political identity.

“The more you do this research, the more you realize environment matters crucially,” Dawes says. “Just because there’s a genetic predisposition doesn’t mean things aren’t going to change. Maybe in college, you have a roommate who influences you, or you live in a community that influences you … None of this stuff is completely nailed down.”