A couple of hours ago I tweeted this:

Shattered tells us in loving detail about every mistake the Clinton campaign made, but every losing campaign gets that treatment. Her campaign also did a lot of things right. My horseback guess is that when you put it all together, she was about average as a candidate and her campaign was about average as a campaign.

But that got me curious: how do Clinton and her campaign compare to past elections? There's no way to measure this directly, but you can get an idea by comparing actual election outcomes to the predictions of a good fundamental model. So I hauled out Alan Abramowitz's model, which has a good track record, and looked at how winning candidates performed compared to the baseline of what the model predicted for them. Here it is:

According to this, Hillary Clinton did way better than any winning candidate of the past three decades, outperforming her baseline by 2.4 percent. Without the Comey effect, she would have outperformed her baseline by a truly epic amount.

Now, was this because she ran a good campaign, or because she had an unusually bad opponent? There's no way to tell, of course. Donald Trump was certainly a bad candidate, but then again, no one thinks that Dole or Gore or Kerry or McCain were terrific candidates either.

Bottom line: we don't have any way of knowing for sure, and this is an inherently subjective question. But the evidence of the Abramowitz model certainly doesn't suggest that Hillary Clinton ran an unusually poor campaign or that she was an unusually poor candidate. Maybe she was, but aside from cherry-picked anecdotes and free-floating Hillary animus, there's not really a lot to support this view.

I suppose this isn't a big surprise, but it sure is discouraging—especially after Donald Trump's disgusting "I'm not endorsing Le Pen, mind you, but she sure is great!" twaddle. The only good news is that Macron is a decent candidate and will almost certainly crush Marine "I promise we're not racists anymore" Le Pen.

Of course, that's what we thought about Hillary Clinton too, so....

By coincidence, right after my Comey post yesterday morning the New York Times published a long tick-tock about how and why Comey did what he did. It doesn't address the question of whether Comey tipped the election, it just provides an insider account of what was going through Comey's head as he made decisions during campaign season.

It makes for depressing reading. The reporters conclude pretty strongly that Comey wasn't driven by any conscious partisan motives. But even if that's true, there were pretty clearly partisan and personal influences at work. Apologies in advance for the length of this post, but putting all six of the following excerpts together in a single narrative is the only way to show what really happened. The story begins two years ago when the FBI opened its probe into Hillary Clinton's emails:

On July 10, 2015, the F.B.I. opened a criminal investigation, code-named “Midyear,” into Mrs. Clinton’s handling of classified information....Everyone agreed that Mr. Comey should not reveal details about the Clinton investigation. But [attorney general Loretta Lynch] told him to be even more circumspect: Do not even call it an investigation, she said, according to three people who attended the meeting. Call it a “matter.”

....It was a by-the-book decision. But Mr. Comey and other F.B.I. officials regarded it as disingenuous in an investigation that was so widely known. And Mr. Comey was concerned that a Democratic attorney general was asking him to be misleading and line up his talking points with Mrs. Clinton’s campaign, according to people who spoke with him afterward.

This seems to have been the starting point. Even when Justice Department officials were making straightforward, "by-the-book" decisions, Comey was paranoid that they were acting to protect a Democrat—something that obviously might invite Republican attack if he went along. This belief continued to grow, and led to much of what happened later, when the investigation was wrapping up:

Early last year, F.B.I. agents received a batch of hacked documents, and one caught their attention. The document, which has been described as both a memo and an email, was written by a Democratic operative who expressed confidence that Ms. Lynch would keep the Clinton investigation from going too far, according to several former officials familiar with the document.

Read one way, it was standard Washington political chatter. Read another way, it suggested that a political operative might have insight into Ms. Lynch’s thinking.

Normally, when the F.B.I. recommends closing a case, the Justice Department agrees and nobody says anything....The document complicated that calculation, according to officials. If Ms. Lynch announced that the case was closed, and Russia leaked the document, Mr. Comey believed it would raise doubts about the independence of the investigation.

This email wasn't related to Lynch or her office in any way. It was just gossip from a third party. But instead of ignoring it, Comey worried that it might leak and hurt his own reputation. This also motivated his decision, when the investigation was over, to hold an unusual press conference which damaged Clinton seriously even though he cleared her of wrongdoing:

Standing in front of two American flags and two royal-blue F.B.I. flags, he read from a script....“Any reasonable person in Secretary Clinton’s position” should have known better, Mr. Comey said. He called her “extremely careless.” The criticism was so blistering that it sounded as if he were recommending criminal charges. Only in the final two minutes did Mr. Comey say that “no charges are appropriate in this case.”

....By scolding Mrs. Clinton, Mr. Comey was speaking not only to voters but to his own agents. While they agreed that Mrs. Clinton should not face charges, many viewed her conduct as inexcusable. Mr. Comey’s remarks made clear that the F.B.I. did not approve.

Former agents and others close to Mr. Comey acknowledge that his reproach was also intended to insulate the F.B.I. from Republican criticism that it was too lenient toward a Democrat.

Again, Comey had failed to play it straight. Even though the decision to exonerate Clinton "was not even a close call," as he later said, he tore into Clinton in order to protect himself from criticism—both from Republicans and from his own agents. This is especially damning given the subsequent evidence that Comey's criticism of Clinton was wildly overstated. The same dynamic played out in reverse a couple of months later over the FBI investigation into Donald Trump and Russian interference in the election:

Mr. Comey and other senior administration officials met twice in the White House Situation Room in early October to again discuss a public statement about Russian meddling....At their second meeting, Mr. Comey argued that it would look too political for the F.B.I. to comment so close to the election, according to several people in attendance. Officials in the room felt whiplashed. Two months earlier, Mr. Comey had been willing to put his name on a newspaper article; now he was refusing to sign on to an official assessment of the intelligence community.

And it played out yet again in September, when agents discovered some Clinton emails on Anthony Weiner's laptop. Michael Steinbach, a former FBI agent who worked closely with Comey, explained what went through Comey's mind:

Agents felt they had two options: Tell Congress about the search, which everyone acknowledged would create a political furor, or keep it quiet, which followed policy and tradition but carried its own risk, especially if the F.B.I. found new evidence in the emails.

....Conservative news outlets had already branded Mr. Comey a Clinton toady. That same week, the cover of National Review featured a story on “James Comey’s Dereliction,” and a cartoon of a hapless Mr. Comey shrugging as Mrs. Clinton smashed her laptop with a sledgehammer.

Congressional Republicans were preparing for years of hearings during a Clinton presidency. If Mr. Comey became the subject of those hearings, F.B.I. officials feared, it would hobble the agency and harm its reputation. “I don’t think the organization would have survived that,” Mr. Steinbach said.

Once again, the primary concern was protecting Comey and the FBI. Republicans had made it clear that their retribution against anyone who helped Clinton would be relentless, and that clearly had an impact on Comey. Steinbach's suggestion that Republican vengeance would have destroyed the FBI is clearly nuts, but Comey was taking no chances. He didn't want the grief.

Even after it was all over, Comey's partisan influences continued to work on him:

Officials and others close to him also acknowledge that Mr. Comey has been changed by the tumultuous year.

Early on Saturday, March 4, the president accused Mr. Obama on Twitter of illegally wiretapping Trump Tower in Manhattan. Mr. Comey believed the government should forcefully denounce that claim. But this time he took a different approach. He asked the Justice Department to correct the record. When officials there refused, Mr. Comey followed orders and said nothing publicly.

Daniel Richman, a longtime friend of Comey’s, said this represented "a consistent pattern of someone trying to act with independence and integrity, but within established channels."

The evidence does indeed show consistent behavior, but of a different kind. At every step of the way, Comey demonstrated either his fear of crossing Republicans or his concern over protecting his own reputation from Republican attack. It was the perfect intersection of a Republican Party that had developed a reputation for conducting relentlessly vicious smear campaigns and a Republican FBI director who didn't have the fortitude to stand up to it. Comey may genuinely believe that his decisions along the way were nonpartisan, but the evidence pretty strongly suggests otherwise.

I have frequently made the case that Donald Trump is president because of FBI director James Comey. On October 28, Comey wrote a letter to Congress telling them that the FBI was investigating a new cache of Clinton emails that it found on the laptop of Huma Abedin's estranged husband, Anthony Weiner. That was the turning point. Clinton's electoral fortunes went downhill from there and never recovered.

As shocking as this may sound, not everyone agrees with me. A new book, Shattered, makes the case that Clinton was an epically bad candidate and her campaign was epically badly run. That's why she lost. Yesterday, Shadi Hamid took aim at me for my continued Comey obsession in the face of the story told in Shattered:

Let's talk. There's a reason I blame Comey, and it's not because I live in a bubble. It's because a massive amount of evidence points that way. Today I want to put the whole case in one l-o-o-o-o-ng post so everyone understands why I think Comey was the deciding factor in the election. If you still disagree, that's fine, but this is the evidence you need to argue with.

NOTE: I want to make clear that I'm talking solely about Hillary Clinton and the presidency here. Democrats have been badly pummeled at the state level over the past six years, and that obviously has nothing to do with Comey. It's something that Democrats need to do some soul searching about.

Ready? Let's start with some throat-clearing.

First: Keep in mind that Clinton was running for a third Democratic term during a period when (a) the economy was OK but not great and (b) Barack Obama's popularity was OK but not great. Models based on fundamentals therefore rated the election as something of a tossup. Clinton was not running as a sure winner.

Second: For the sake of argument, let's assume that Hillary Clinton was an epically bad, unpopular candidate who ran a terrible campaign. She foolishly used a private email server while she was Secretary of State. She gave millions of dollars in speeches after leaving the State Department. She was a boring speaker with a mushy agenda. She was a hawkish Wall Street shill who failed to appeal to millennials. She lost the support of the white working class. Her campaign was a cespool of ego, power-mongering, and bad strategy. Let's just assume all that.

If this is true, it was true for the entire year. Maybe longer. And yet, despite this epic horribleness, Clinton held a solid, steady lead over Trump the entire time. The only exception was a brief dip in July when Comey held his first presser to call Clinton "extremely careless" in her handling of emails. Whatever else you can say about Hillary Clinton, everyone knew about her speeches and her emails and her centrism and everything else all along. And yet, the public still preferred her by a steady 3-7 percentage points over Trump for the entire year.

Third: Every campaign has problems. If you win, they get swept under the rug. If you lose, bitter staffers bend the ears of anyone who will listen about the campaign's unprecedented dysfunction and poor strategy. This is all normal. Both the Clinton and Trump campaigns had all the usual problems, and in a close election you can blame any of them for a loss. But two things set the Comey letter apart. First, it had a big effect right at the end of the race. Second, it was decidedly not a normal thing. It came out of the blue for no good reason from the chief law enforcement officer of the United States. There is nothing Clinton could have done about it.

With that out of the way, let's take a look at the Clinton campaign. All of the poll estimates look similar, but I'm going to use Sam Wang's EV estimator because it gives a pretty sharp day-to-day look at the race. (Wang's final estimate was wrong, of course, like pretty much everyone else's, but don't worry about that. What we're interested in is the ups and downs.) First off, here are his daily estimates through the end of August:

With the brief exception of the July Comey presser, the race was amazingly stable. During the entire year, Clinton has a formidable lead that translates into 330-340 electoral votes. Now let's pick up the story in September:

At the beginning of September, Clinton slumps following her "deplorables" comment and her stumble at the 9/11 memorial. After Trump's shockingly bad performance at the first debate she starts to regain ground, and continues to gain ground when the Access Hollywood tape is released. By the end of October she's back to where she started, with a big lead over Trump. THIS IS IMPORTANT: despite everything — weak fundamentals, the "deplorables" comment, her personal unpopularity, her mushy centrism, her allegedly terrible campaign — by the end of October she's well ahead of Trump, just as she had been all year. It's clear that 330-340 electoral votes is her baseline level of support.

On October 25, HHS announces that Obamacare premiums will go up substantially in the following year. This doesn't appear to have any effect. Then, on October 28, Comey releases his letter. Clinton's support plummets immediately, and there's no time for it to recover. On November 8, Trump is elected president.

But how much did Comey's letter cost Clinton? Let's review the voluminous evidence:

I'm not sure how much clearer the evidence could be. Basically, Hillary Clinton was doing fine until October 28. Then the Comey letter cost her 2-4 percent of the popular vote. Without Comey she would have won comfortably — possibly by a landslide — even though the fundamentals predicted a close race.

That's it. That's the evidence. If you disagree that Comey was decisive, you need to account for two things. First, if the problem was something intrinsic to Clinton or her campaign, why was she so far ahead of Trump for the entire race? Second, if Comey wasn't at fault, what plausibly accounts for Clinton's huge and sudden change in fortune starting precisely on October 28?

One way or another, it appears that all the things that were under Hillary Clinton's control were handled fairly well. They produced a steady lead throughout the campaign. The Comey letter exists on an entirely different plane. It was an unprecedented breach of protocol from the FBI; it was completely out of Clinton's control; and it had a tremendous impact. That's why I blame James Comey for Donald Trump's victory.

UPDATE: I've added a chart showing Clinton's level of support from May through August.

1The second letter was the one that cleared her. However, merely by keeping the subject in the news, it hurt Clinton.

Hopper is not asleep in this photo. She was smooching her cheek on an outdoor table and momentarily closed her eyes in a fit of pure feline bliss. We should all consider ourselves lucky if just once in our lives we feel the happiness Hopper is feeling in this moment.

Are we in a second housing bubble, as I suggested in a chart I posted a couple of days ago? Brad DeLong has an optimistic take:

There were three good reasons in the mid-2000s to believe that housing prices should jump substantially....How much were these worth? Not enough to boost housing prices to their 2005 values. But plausibly enough to boost housing prices to their values today. IMHO, the best way to view the graph is as a positive "displacement" boom caused by true fundamentals, a bubble upward overshoot, a crash downward undershoot, and now (we hope) equilibrium.

Maybe! Check back in a couple of years and I'll tell you who's right.

This happened on April 3rd:

This happened two weeks later:

After three years in detention, the Egyptian-American aid worker Aya Hijazi was cleared of child abuse and human trafficking charges in Cairo on Sunday, abruptly ending a high-profile case that had become an international symbol of Egypt’s harsh crackdown on aid groups.

Coincidence? I think not. Trump made a deal: he'd praise al-Sisi and host him in the White House in return for the release of a prisoner. This is what happens when foreign governments know that the president is a weak leader who can be humiliated without consequence.

Do I believe this? Nah—though I imagine that al-Sisi did in fact make this happen as a gesture of goodwill. But where are all the right-wingers who insisted for eight years that stuff like this was clear evidence of Obama caving in to hostage-takers? I assume you all feel the same way about Trump. Don't you?

Matt Yglesias says Mark Zuckerberg could do the world a favor by deep-sixing Facebook:

He bases his call to action on research like this:

Overall, our results showed that, while real-world social networks were positively associated with overall well-being, the use of Facebook was negatively associated with overall well-being. These results were particularly strong for mental health; most measures of Facebook use in one year predicted a decrease in mental health in a later year. We found consistently that both liking others’ content and clicking links significantly predicted a subsequent reduction in self-reported physical health, mental health, and life satisfaction.

This particular study is prospective and longitudinal: it begins with a group of people and follows them for a couple of years. The benefit of this is that you get more than a mere association. If all you had was a set of data showing that (a) Facebook use is (b) correlated with poor mental health, you'd have no way of knowing if A causes B or B causes A.

This longitudinal data still doesn't answer the question conclusively. It could be that as people become depressed, they spend more time on Facebook. In fact, maybe without Facebook they would have gotten even more depressed. Who knows? You'd almost literally need to track day-by-day mental health and Facebook use to find out.

But I'm totally willing to believe that Facebook is evil even without hard evidence. The casually brutal insults almost certainly outweigh the praise for a lot of people. It instills a sense of always needing to keep up with things every minute of the day. It interferes with real-life relationships. It takes time away from more concentrated activities that are probably more rewarding in the long run.

This doesn't apply to all Facebook users. In fact, I'd guess that it applies to only 10-15 percent of them. But that's enough.

It doesn't matter, of course. Mark Zuckerberg surely disagrees, and anyway, he couldn't shut down Facebook even if he wanted to. He may nominally control the company, but shareholders still have rights. Preventing the CEO from blowing up the company because he's feeling guilty about something is certainly one of them.

On the other hand, perhaps we could at least set an age limit for Facebook. If you aren't allowed to drink before age 21, surely you shouldn't be allowed to use social media either. I'd bet the latter is more dangerous than the former.

I love this tweet:

Trump, of course, has accomplished virtually nothing so far. He's issued a few executive orders that are mostly small beer, and signed a few bills that rescinded some of Obama's executive orders. That's it. His health care bill was a fiasco. He hasn't gotten funding for his wall. His immigration order crashed and burned. He has no tax plan. He has no plan to destroy ISIS.

But there's a silver lining here. As always, today's tweet should be read as an alert aimed at his base. He's telling them that in a few days they'll see a lot of stories saying he's accomplished nothing. In fact, less than nothing, since the government might well be headed for a shutdown by the end of next week. But it's all lies! Clearly he's concerned about this.

That should give Democrats an opening. Try to strike a budget deal before next week's deadline. Agree to support some money for Trump's wall in return for making Obamacare's CSR appropriation automatic.1 This would be good for Trump in two ways. First, he gets to say that he's started building the wall. Second, Obamacare doesn't collapse on his watch, and agreeing to the CSR appropriation doesn't do anything to stop him from trying to repeal and replace Obamacare later. It just ensures that it will work in the meantime.

In return, Democrats don't really get anything. Agreeing to funding for the wall is unpopular with their base, and CSR funding is something that only a few wonks care about. Keeping the CSR money flowing would help insurance companies and it would help actual people, but politically it does nothing much for Democrats.

It's kind of funny, isn't it? I assume Trump is unwilling to make this deal. I don't know why, since it seems almost entirely favorable to him. But he won't do it. Maybe Democrats wouldn't do it either. Is the art of the deal really that dead in Congress these days?

1CSR stands for Cost Sharing and Reduction. It's money paid to insurance companies to reduce deductibles and copays for low-income families. It's been the subject of a long-running court fight, and insurers are justifiably worried about whether they're going to receive the money they've been promised.

The New York Times reports that gerrymandering is headed to the Supreme Court again:

A bipartisan group of voting rights advocates says the lower house of the Wisconsin Legislature, the State Assembly, was gerrymandered by its Republican majority before the 2012 election — so artfully, in fact, that Democrats won a third fewer Assembly seats than Republicans despite prevailing in the popular vote. In November, in a 2-to-1 ruling, a panel of federal judges agreed.

....In Supreme Court cases in 1986, 2004 and 2006, justices variously called partisan gerrymanders illegitimate, seriously harmful, incompatible with democratic principles and “manipulation of the electorate.” But they have never struck one down....One participant in the 2004 decision, Justice Anthony M. Kennedy, may prove the fulcrum in the court’s deliberations....“The ordered working of our Republic, and of the democratic process, depends on a sense of decorum and restraint in all branches of government, and in the citizenry itself,” he wrote then.

At a time of soaring concern over hyperpartisanship, those words could resonate. That sentence “is the most important line” in the court’s decision, said Edward B. Foley, director of the Election Law Project at the Ohio State University Moritz College of Law. “He’s going to look at what’s going on in North Carolina as the complete absence of that. I think that helps the plaintiffs in any of these cases.”

Today's gerrymandering is not your grandfather's gerrymandering. It's a practice that's been around for a long time, but back when it depended on humans it was necessarily limited. There were a few legislative geniuses who could wreak real havoc, and anyone could gerrymander well enough to gain a seat or two. But computers have changed the game fundamentally. Every legislature is now a supergenius at gerrymandering, which is why estimates of the number of congressional seats attributable to gerrymandering have been going up for years.

There's a point, I think, where the Supreme Court has to recognize that quantitative changes over time have finally produced a qualitative change. Modern gerrymandering is just too good. The silver lining here is that if computers can revolutionize gerrymandering, they also hold out hope of revolutionizing the detection of gerrymandering. You can no longer say that there's no possible standard for ruling that a particular district map is unconstitutional. In fact, there are several plausible candidates. Hopefully the court will finally recognize this.