Should they stay or should they go?

Party leaders are asking themselves that question a lot lately, as old social media posts are dredged up about some of their candidates.

Conservative Leader Andrew Scheer says that, on condition of an apology and acceptance of responsibility for what they've said in the past, he would stand by Conservative candidates with a history of racist or homophobic comments.

For Green Leader Elizabeth May, a spate of controversies over the positions of her candidates on abortion and Quebec independence have led her to launch a re-vetting of the names her party plans to put on ballots across the country.

And it's likely to only get worse, as parties continue to dig into the social media histories of their rivals.

But the local impact of forcing a party to drop a candidate is not very strong — suggesting these efforts have a broader aim of knocking a leader off message and derailing the carefully laid plans of campaign managers.

An analysis of the performance of candidates who were last-minute replacements in the 2015 federal election campaign suggests that dropping a candidate from the ballot only has a marginal impact on the results that party will get in a riding.

There were 13 candidates who were replaced over the course of the last campaign, five each by the Conservatives and Liberals and three by the New Democrats. The Liberal candidates were all in British Columbia and Alberta, while the Conservatives were in Ontario and Quebec. The NDP lost one candidate in Manitoba and two in Atlantic Canada.

Replacement candidates did worse in 2015

By comparing the results in each of the ridings where a candidate was replaced to those in the rest of the region where that party's candidates were not replaced, we get an idea of how these replacements performed.

On average, parties did 3.2 percentage points worse in ridings where they replaced a candidate compared with other ridings in the same region where they did not.

In the B.C. riding of South Surrey-White Rock, for example, the Liberals dropped a candidate over comments related to pregnancy and marijuana use. Her replacement improved on the Liberals' 2011 score in the riding by 22 points. But other Liberal candidates in the Fraser Valley and southern Lower Mainland experienced an average gain of 27 points.

Conservative Leader Andrew Scheer says he will stand by candidates with racist, homophobic past comments as long as they apologize. 0:27

While that is one case, it is a pattern that was repeated over nine of the 13 ridings in which a candidate was replaced. In only three ridings did the replacement do better than other candidates in the region, but only by a marginal amount of about a point or two. Most of the under-achieving replacements did between three and seven points worse than their neighbouring colleagues.

Did this have an impact on the outcome of the election? Probably not. Only in South Surrey-White Rock was the margin narrow enough that the loss of the original candidate might have cost the party a victory. But there were 47 ridings across Canada decided by 3.2 percentage points or less — suggesting that a last-minute loss of a candidate in any of these ridings could have made the difference.

Why replacing a candidate can hurt

There are several reasons why the loss of a local candidate could have a negative impact — it reflects badly on the party and erases much of the work that might have been done by that candidate in the riding before the writs were dropped. A replacement might come in with less name recognition and the party's local organization could be disrupted.

But the marginal gains to be made by forcing a local candidate to be replaced might be over-shadowed by the wider impacts on the campaign. Instead of talking about climate change, May was forced to spend her first campaign days answering questions on abortion and Quebec sovereignty.

Instead of hammering home the Conservatives' message on affordability, Scheer has had to dismiss as distractions the latest controversies dug up by the Liberal opposition research team.

There are only 35 days left for leaders to make their pitch to voters — they can't afford to lose a single day.

So expect more of these unsavoury comments by candidates to be re-surfaced. And the worst might be yet to come. After Oct. 2, the ballots will be sent off to the printers — and parties will be stuck with the names that are on them.

Stream the latest episode below and subscribe to The Pollcast with Éric Grenier here.