Rob Johns is professor of politics at Essex University and an election night analyst on STV. In the latest of a series of blogs, he looks at how personal identity might influence the vote on December 12.

Would you be unhappy if your son or daughter married someone who voted the other way than you in the Brexit referendum?

If you answered 'yes', then you're not unusual - so did 33% of British Election Study respondents.

This kind of survey question has been used for decades to measure social distance - how far different groups feel from each other. While mostly used to gauge distance and prejudice between ethnic or religious groups, it can also be applied to political identities. One recurring finding from surveys after the EU referendum is that many voters feel their Remain/Leave identity more strongly than their party identity. So a Labour Remainer walking his daughter up the aisle might well rather see a Tory Remainer than a Labour Leaver waiting nervously at the altar.

In Scotland, of course, there is another source of potential friction between in-laws. The independence referendum seemed to divide opinions at least as deeply as the Brexit vote. Strength of feeling in the campaign was obvious. There was little common ground between the two sides. (In the Scottish Referendum Study surveys, more people disagreed than agreed with the statement "Although I was on one side of the debate, I must admit that the other side had strong points".) Voting in subsequent elections confirms the divide, with between 85% and 90% of voters choosing parties that had been on the same side as them in 2014.

Sadly, there is no poll telling us how 'Yes' voters would feel about their offspring marrying 'No' voters, or the other way round. But the British Election Study does offer a series of questions assessing this kind of political tribalism. First, people were asked whether they think of themselves as closer to a particular party or, in the case of the independence and Brexit referendums, closer to one side or the other. Around three quarters of Scottish voters said that they feel close to a party, compared to almost nine in ten who felt an allegiance to the Remain or Leave and to the Yes or No sides.

Next, for every allegiance that they claimed, respondents were asked how far they agree with statements such as those in the graph below. The picture is clear. As in the rest of Britain, more voters feel a strong Remain/Leave identity than a strong party identity - but still more feel a strong Yes/No identity.

What has all this got to do with the 2019 election?

Well, one obvious point is that we would expect voting to remain clearly divided along Yes/No lines. No one who feels criticism of their side as a personal insult is likely even to contemplate voting for a party on the other side. (And they are likely to hear plenty such criticism during this - as every - election campaign.)

The other reason why this matters is because of what it implies for tactical voting. Who wins Scotland's numerous marginal seats will hinge largely on whether unionist voters can unite around the candidates most likely to defeat the SNP. Even if they can agree on who those candidates are (which is not a trivial matter), the willingness to vote for them cannot be taken for granted. It depends on the strength of the loyalties described above.

The likeliest tactical voter is someone who feels most strongly about their indyref position. The results in the graph above are therefore promising for such voting. More information is needed, however. (After all, it might be that the strong indyref identifiers are mostly on the Yes side, which would be good news only for the SNP.) The next graph is based on combining the "we rather than they" and "personal insult" questions with others to create a strength-of-identity rating for each of a person's political loyalties. We can then see which matters most for some of the key groups of voters with split loyalties in 2019.

Conservative supporters, overwhelmingly No voters in 2014, are strongly inclined to prioritise that No identity above their Brexit identity - regardless of whether they voted Remain or Leave. Even among Tory Remainers, then, defection is more likely for tactical unionist reasons than out of frustration at Boris Johnson's enthusiasm for Brexit. For various reasons, however, they seem much likelier to lend votes to the Liberal Democrats than to Corbyn's Labour.

For Labour and Lib Dem Remainers, the unionist identity predominates but not by as much. One in three such voters who feel more strongly pro-EU than pro-Union. They seem unlikely to vote for the 'get Brexit done' Conservatives to deny the 'stop Brexit' SNP. This limits the likely tactical switching among that group.

At first sight, SNP Leavers look least committed to their indyref identity. Yet they are also the most likely to feel party identity most strongly, and SNP identity and support for independence are now tightly entwined. Nevertheless, again around one in three of them feels Leave more strongly than Yes. The graph shows why most SNP Leavers voted for the party in 2017 and will do again, but also why some defected to the Tories in 2017 and probably will do again.

The long shadow of 2014 is clearly visible in these results. It is just as visible in the way that Scottish election results are interpreted by commentators and politicians. Whatever the complex blend and balance of identities that voters bring to the polling station, the obsession on election night will be whether the SNP has won a majority of Scottish seats and thus bolstered its mandate for another independence referendum. This looks highly likely on current polls but, with so many marginal seats, it cannot be taken for granted. Indeed, it is in unionist voters' hands to deny the SNP that mandate. But they will have to forget all other loyalties in order to do so.

You can follow Rob on Twitter: @robjohns75