Institutions, the Economy, and the Dynamics of State Elections