Macroeconomic equilibrium and nominal price rigidities under imperfect rationality