An article at the Pew Research Center brings up a really important point about presidential elections in Latin America: incumbents rarely lose.
Since 1980, incumbents in South America (not including Guyana, Suriname and French Guiana) have won all 17 presidential elections in which they were on the ballot. During the same period, four American presidents (Ronald Reagan, Bill Clinton, George W. Bush and Barack Obama) won re-election and two (Jimmy Carter and George H.W. Bush) were defeated.
Please make sure to keep this in mind as you read all the op-eds explaining grand trends, ideological pivots, etc. This is happening a lot with the Brazilian election since it had so much ideological drama.
A key reason is Latin American presidentialism. The presidency is stronger in Latin America than in the United States. The position provides incumbents with resources that the U.S. president does not have (including state media). It doesn't even matter what the economy is like.
So when you read about why Dilma Rousseff was re-elected, a more interesting question is what unlikely confluence of events would've led to her defeat.