election defeat analysis